| Author |
Message |
B Aho
Joined: 19 Mar 2007 Posts: 5
|
Posted: Mon Mar 19, 2007 7:37 pm Post subject: /quiet command-line switch |
|
|
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 |
|
 |
James Moore
Joined: 21 Nov 2005 Posts: 245
|
Posted: Tue Mar 20, 2007 1:53 am Post subject: No dialog |
|
|
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 |
|
 |
B Aho
Joined: 19 Mar 2007 Posts: 5
|
Posted: Wed Mar 21, 2007 6:22 pm Post subject: Re: No dialog |
|
|
| 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 |
|
 |
James Moore
Joined: 21 Nov 2005 Posts: 245
|
Posted: Wed Mar 21, 2007 6:28 pm Post subject: |
|
|
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 |
|
 |
|
|
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