« Installer & Setup Projects, Part 2 | Main | Embedded Resources »

MSDE Setup & Installers, SCM.exe, Part 3

SCM has a –silent switch you can pass it.

230236 BUG: SCM.EXE Command Line Arguments Not Documented in SQL 7.0 Books

http://support.microsoft.com/?id=230236

For Example

scm.exe -Action 1 -Server myserver -Service MSSQLServer –Silent 1

 

To make a database detachable, the suggested method is set the database option OFFLINE, then detach.

 USE master

GO

ALTER DATABASE pubs SET OFFLINE WITH ROLLBACK IMMEDIATE

GO

sp_detach_db pubs

GO

 Read about OFFLINE database option, and the ROLLBACK clause:

Setting Database Options

http://msdn.microsoft.com/library/en-us/createdb/cm_8_des_03_6ohf.asp

 

See the table of internal and equivalent external properties:

Using SQL Server Desktop Engine Merge Modules

http://msdn.microsoft.com/library/en-us/distsql/distsql_8yeq.asp

For more information about these properties and valid arguments:

http://msdn.microsoft.com/library/en-us/distsql/distsql_84xl.asp

 

A. Use the SETUP.INI in the /settings switch (external property).

Example: D:\MSDE2000\>setup.exe /settings setup.ini D:\MSDE2000\setup.ini /L*v C:\MSDE_setup.log

 

B. You can pass parameters directly to the .msi package (external property) via the command line or place it in the Property table inside the .msi package (internal property).  Passing a public property can be done via the command line such as the REBOOT property above, be sure and use all caps when passing public properties (also discussed in the msi.chm help file).  So here is an example command line I could use to pass the REBOOT public property:

            Msiexec /i MyPackage.msi REBOOT=ReallySuppress

           

If you want to ALWAYS have a property set and run, you can open up the .msi package using an authoring tool, such as Orca included in the SDK Tools directory, and enter the Property name and value in the Property table.  See http://support.microsoft.com/support/kb/articles/q255/9/05.asp  for information on using Orca to make this type change.

 

C. You can run Setup.exe from within another Microsoft® Windows® application through a call to the Win32® CreateProcess() function, passing setup switches in a character string using the lpCommandLine parameter.

 

D. To run other apps from a merge modules, like SCM.exe to start SQL Server, you have to design custom actions and pass parameters, which I know is not easy with Windows Installer.

 

See also

Desktop Engine Installation Samples

http://msdn.microsoft.com/library/en-us/distsql/distsql_7b91.asp

 

 

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)