Title | Automate installation of Stata | |
Author | Kevin S. Turner, StataCorp |
Starting with Stata 9, the Windows installer was developed using Microsoft’s installer format (MSI). For the average user, whether the installer is built using MSI matters little. MSI provides certain facilities to aid with advanced upgrading or automating installations over many machines. These tasks are particularly useful for system administrators.
The MSI format specifies several command-line arguments for automating an install process, and all of these are available to the Stata installer. You can view these command-line arguments by running the msiexec command, which can be run from any DOS window or from the Run option on the Start menu.
Although explaining every command-line argument is beyond the scope of this FAQ, there are some that are important for automating an install.
/qn | Turns off any visual user interface. |
---|---|
[PROPERTY=PropertyValue] | Allows you to preset some variables that the installer uses internally. |
The properties are typically installation-specific variables, so, before you can set them, you must know what they are. There are three installation properties you need to know to automate the Stata installer. They are
INSTALLDIR | Specifies the path where Stata will be installed. Default value is: C:\Program Files\Stata9. |
---|---|
STATAFLAVOR | Specifies the flavor of Stata to install. Possible values are: mp, se, intercooled, and small, where se is the default. |
EXECUTABLETYPE | Indicates either 32-bit or 64-bit executable. Possible values are: 32 and 64, where 32 is the default. |
With just the /qn option set and no properties specified, the Stata installer will use the default property values. You can override as many or as few of the properties as you want. From the command line or a scripting language, you could issue the following command to silently install Stata/MP for 64-bit Windows (drive E: is arbitrary and represents the CD drive):
E:\setup.exe /qn EXECUTABLETYPE=64 STATAFLAVOR=mp
While this installer runs, you might notice some extra processes in the Task Manager or simply notice that the computer is working on something, but, because of the /qn switch, you should see no visual evidence of the installer. When the application is installed, you will find it via the Start menu under All Programs. Logging is available via the MSI specification should you need confirmation of installation.
Learn
Free webinars
NetCourses
Classroom and web training
Organizational training
Video tutorials
Third-party courses
Web resources
Teaching with Stata
© Copyright 1996–2024 StataCorp LLC. All rights reserved.
×
We use cookies to ensure that we give you the best experience on our website—to enhance site navigation, to analyze usage, and to assist in our marketing efforts. By continuing to use our site, you consent to the storing of cookies on your device and agree to delivery of content, including web fonts and JavaScript, from third party web services.
Cookie Settings
Last updated: 16 November 2022
StataCorp LLC (StataCorp) strives to provide our users with exceptional products and services. To do so, we must collect personal information from you. This information is necessary to conduct business with our existing and potential customers. We collect and use this information only where we may legally do so. This policy explains what personal information we collect, how we use it, and what rights you have to that information.
These cookies are essential for our website to function and do not store any personally identifiable information. These cookies cannot be disabled.
This website uses cookies to provide you with a better user experience. A cookie is a small piece of data our website stores on a site visitor's hard drive and accesses each time you visit so we can improve your access to our site, better understand how you use our site, and serve you content that may be of interest to you. For instance, we store a cookie when you log in to our shopping cart so that we can maintain your shopping cart should you not complete checkout. These cookies do not directly store your personal information, but they do support the ability to uniquely identify your internet browser and device.
Please note: Clearing your browser cookies at any time will undo preferences saved here. The option selected here will apply only to the device you are currently using.