I work for a semi-large research organization. One of our staff members requested a Stata 12MP package to be built for possible deployment to up to 250 staff.
The requirements were as follows:
Semi-silent (non user-interactive) installation of Stata 12MP on both Windows XP and
Windows 7-64bit systems that may or may not have Stata 11MP installed. If Stata 11MP
is installed, remove it before installing Stata 12MP. Also, make sure autoupdate functionality
is turned off and that the company license is automatically (and silently) installed.
Here is the logic I used to build the package:
1. Check for Stata 11 executable in Windows XP - if found, remove Stata 11.
2. Check for Stata 11 executable in Windows 7 - if found, remove Stata 11.
3. Check what OS we are using. If WinXP, install Stata12MP-32bit. If Win7, install Stata12MP-64bit.
4. Check what OS we are using and copy profile.do (autoupdate disabler) to the Stata 12 Program Files folder.
5. Check what OS we are using and copy STATA.LIC (Stata 12 license file) to the Stata 12 Program Files folder.
Here is how to build the package:
1. Create a "profile.do" (autoupdate disabler) file:
Create a new text file with notepad containing the following two lines:
set update_query off
set update_prompt off
Save file as "profile.do".
2. To get the "STATA.LIC" (Stata license) file:
Install Stata 12 manually and enter your license information on first run.
Stata saves your license information in its Program Files folder, named "STATA.LIC".
3. Create a folder with the original installation files, plus the "profile.do" and "STATA.LIC" files.
4. Use the following script, created from the steps outlined above:
I saved to above script as "install.bat" and placed that in a folder with my source files.
I then used "IExpress" (a self extracting executable creator, built into Windows) to build the package. (http://en.wikipedia.org/wiki/IExpress)
The install command I used in IExpress was: "cmd.exe /c install.bat". This allows the package to run on WinXP and Win7 64bit.
The package is now ready to be deployed using KACE, Altiris, SCCM, etc...
Thank you to rock_star for the info on the "profile.do" file.
Stata 12 causes a problem tryoing to run the MST
Error 1606: Could not access network location.
After a lot of trail and error we found out that during the creation off the MST at the point where Stata asks for the "Default working directory". You have to select "Use a fixed Folder for all Users" and also fysically have to create this folder through "Browse".
We tried a few times to leave it default "C:\data" but everytime the error 1606 came up. So if you want to use "c:\data" create it from inside the program.
Sorry best way to explain it without pictures.
Strange part is Stata 11 on the same machine wasn't a problem at all.
please feel free to contact me if you need a better explanation.