Red Gate forums :: View topic - /quiet command-line switch
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager Previous Versions
SQL Packager Previous Versions forum

/quiet command-line switch

Search in SQL Packager Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
B Aho



Joined: 19 Mar 2007
Posts: 5

PostPosted: Mon Mar 19, 2007 7:37 pm    Post subject: /quiet command-line switch Reply with quote

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
Back to top
View user's profile Send private message
James Moore



Joined: 21 Nov 2005
Posts: 245

PostPosted: Tue Mar 20, 2007 1:53 am    Post subject: No dialog Reply with quote

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
Back to top
View user's profile Send private message
B Aho



Joined: 19 Mar 2007
Posts: 5

PostPosted: Wed Mar 21, 2007 6:22 pm    Post subject: Re: No dialog Reply with quote

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?
Back to top
View user's profile Send private message
James Moore



Joined: 21 Nov 2005
Posts: 245

PostPosted: Wed Mar 21, 2007 6:28 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group