/quiet command-line switch

Forum for users of SQL Packager database archive utility

Moderator: David Atkinson

/quiet command-line switch

Postby B Aho » Mon Mar 19, 2007 7:37 pm

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
Last edited by B Aho on Wed Mar 21, 2007 6:27 pm, edited 1 time in total.
B Aho
 
Posts: 5
Joined: Mon Mar 19, 2007 7:32 pm

No dialog

Postby James Moore » Tue Mar 20, 2007 1:53 am

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
James Moore
 
Posts: 242
Joined: Mon Nov 21, 2005 9:35 am

Re: No dialog

Postby B Aho » Wed Mar 21, 2007 6:22 pm

James Moore wrote: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?
B Aho
 
Posts: 5
Joined: Mon Mar 19, 2007 7:32 pm

Postby James Moore » Wed Mar 21, 2007 6:28 pm

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
James Moore
 
Posts: 242
Joined: Mon Nov 21, 2005 9:35 am


Return to SQL Packager Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest