How To Use Setup Wizard Command Line Arguments for Silent Mode

This article was previously published under Q182470
This article has been archived. It is offered "as is" and will no longer be updated.
SUMMARY
When you use the Visual Basic 5.0 Application Setup Wizard or the Visual Basic 6.0 Package and Deployment Wizard to create an application distribution set, you can perform a silent install and uninstall of the application through the use of command-line arguments. This article documents those command-line arguments.
MORE INFORMATION
WARNING: ANY USE BY YOU OF THE INFORMATION PROVIDED IN THIS ARTICLE IS ATYOUR OWN RISK. Microsoft provides this information "as is" withoutwarranty of any kind, either express or implied, including but not limitedto the implied warranties of merchantability and/or fitness for aparticular purpose.

Microsoft does not provide technical support for this feature for thefollowing reasons:
  • This is an untested feature and therefore may not work as expected in some circumstances.
  • This feature may not exist in future releases.
  • This is an undocumented feature. We are documenting it in the Knowledge Base for use at your own risk.

Silent Install Usage

The following command-line syntax allows for a silent install:
c:\mydir\setup.exe -s c:\mydir\myapp.log
This command line assumes that "c:\mydir" is the folder that contains Setup.exe. The -s switch allows for the silent install, and "myapp.log" is the .log file that is created to track all modifications that the installation makes. Note that the log file is required with the -s switch.

Silent Uninstall Usage

The following command-line syntax allows for a silent uninstall:
St5unst -n "C:\Program Files\MyApp\St5unst.log" -f -q

St6unst -n "C:\Program Files\MyApp\St6unst.log" -f -q
NOTE: You must use the quotation marks when there is a space in the path or file name.

These command lines use the version-specific uninstall executable files with the -n switch, which allows the uninstall executable to run from a command line. The St5unst.log and the St6unst.log files contain all pertinent information about the installation of the application. You must use the -f and the -q switches in conjunction to force an SMS uninstall, which is silent by default.

NOTE: Installing an application using the NT Schedule service with the silent or SMS parameter will not work and is not supported. The Schedule service does not create a complete copy of the environment when it starts the Setup. When Setup tries to check for free disk space, the test fails because the TMP and TEMP environment variables are not present. Trying to work around the problem by setting the variables in a batch file, such as the following example, also fails:
   Set TMP=C:\TEMP   Set TEMP=C:\TMP   Setup -q MyLog.txt				
When you run the Setup as an NT Service, the only alternative is to run itin interactive mode.
Properties

Article ID: 182470 - Last Review: 12/05/2015 08:28:22 - Revision: 1.2

Microsoft Visual Basic 5.0 Professional Edition, Microsoft Visual Basic 6.0 Professional Edition, Microsoft Visual Basic 5.0 Enterprise Edition, Microsoft Visual Basic 6.0 Enterprise Edition

  • kbnosurvey kbarchive kbhowto KB182470
Feedback