/quiet command-line switch

B AhoB Aho Posts: 7
edited March 21, 2007 1:28PM in SQL Packager Previous Versions
Hi,

Our installation calls out to a SQL Packager 5 EXE which installs our database.

We like the fact that when you run it without the /quiet switch, it gives you a progress bar with status messages. If an error occurs, it shows up in a nice error dialog, which is helpful to our field personnel.

However, once successful--at the end, it forces you to click OK on a dialog that says database creation completed.

When we invoke the EXE with the /quiet switch, we lose all of the nice progress bars and error information.

Is there a way to not use the /quiet switch but also to not get the ok dialog at the end? If so, we'd probably want to run the EXE that way.

Thanks,
Bryan

Comments

  • Hi Bryan,

    You can achieve this fairly easily - SQL Packager compiles up the executable from a set of C# files in the SQL Packager Code Templates directory in C:\program files\red gate\sql bundle 5\ directory.

    To suppress the message box if you find the file PackageMain.cs and search for the line:

    PackageUtils.ShowMsg(new PackageExceptionInfo("Package executed successfully."));

    you should see the following code:

    if (result == 0)
    {
    PackageUtils.ShowMsg(new PackageExceptionInfo("Package executed successfully."));
    }

    If you remove these three lines and recreate your package it should then work fine without showing the message box on completion.

    Hope this helps,

    - James
    James Moore
    Head of DBA Tools
    Red Gate Software Ltd
  • Hi Bryan,

    You can achieve this fairly easily - SQL Packager compiles up the executable from a set of C# files in the SQL Packager Code Templates directory in C:\program files\red gate\sql bundle 5\ directory.

    To suppress the message box if you find the file PackageMain.cs and search for the line:

    PackageUtils.ShowMsg(new PackageExceptionInfo("Package executed successfully."));

    you should see the following code:

    if (result == 0)
    {
    PackageUtils.ShowMsg(new PackageExceptionInfo("Package executed successfully."));
    }

    If you remove these three lines and recreate your package it should then work fine without showing the message box on completion.

    Hope this helps,

    - James

    Great, thanks for the reply. Our DBA is the one building these on a regular basis. Is there a way for him to make this change once, and then have it persist for his future builds?
  • Yep,

    if he makes the change in his program files directory it will happen for all future packages.

    - James
    James Moore
    Head of DBA Tools
    Red Gate Software Ltd
Sign In or Register to comment.