1
Using Silent Install Scripts to Deploy Software to MS Windows PCs.
Larry Carpenter, P.E.CAx Administrator / FE AnalystSiemens HealthcareMolecular Imaging DivisionHoffman Estates, IL [email protected](847) 304-SDRC (7372)
2
Topics
The Need For Install Scripts
Why Use Windows Batch Scripting?
Silent Install Methods
Usage & Syntax Examples
Complete Install Scripts
3
The Need for Install Scripts
Manually installing various types of software on multiple PCs is:
Time consuming
Error plone
BOOOOOORRRRRRIIIIIIIINNNNNGGGG!!!
Error Prone
4
Why Use Batch Scripting?
Easy to learn and use
Been around since days of DOS
Doesn’t require any real programming knowledge
Only requires a text editor (Notepad)
Easy for others to follow if needed
Is capable of a lot of the same stuff as other languages
Uses same command line syntax as performing a silent install.
5
Silent Install Methods
InstallShield’s “setup.exe” method is used by:
I-DEAS 11 & earlier versions
Teamcenter Engineering 9.1.3 & earlier versions
Older Java versions
Many other programs
Windows Installer (MSI) method is used by:
NX4+ & I-DEAS 12+
Teamcenter Engineering 2005+
TC Visualization
NX Nastran
%
6
Silent Install Method - MSI
‘msiexec’ syntax example:
msiexec /i "%IDEAS_DIST%\Java\Java.msi" /quiet /passive INSTALLDIR=C:\j2sdk1.4.2_05 ALLUSERS=1 /l* %LOG%\%COMPUTERNAME%.log
More information can usually be found in the application’s install guide, related documentation, or simply enter “msiexec” at a command prompt to view general usage syntax.
7
Creating a Simple Install Script
1. Create a text file named with a .bat or .cmd extension and place the logic for the silent install(s) into the file. You can do consecutive installs from the same script.
2. Place the newly created batch file in a network location accessible by each client.
3. On every PC, double click the batch file to begin the install.
8
Things to Add to the Install Script
Log script progress
Remove old software
Check for success of install or uninstall
Configure OS settings (system variables, registry settings, etc.)
Create directory structures & set file permissions
Copy client customizations
Apply patches
Set it up for remote deployment (via SMS for example)
9
Log Example
Create a new batch file redirecting STDOUT to a file using the ‘>’ operand.
For example, the contents of this new batch file may contain the following:
The Install_NX5.bat is the actual install script. All output is sent to a log file in the local temp directory.
11
Remove Software Example
You can usually find the uninstall command string for your application within the Windows Registry.
Use ‘regedit’ to open the Registry and browse to:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Search for your app’s key and ‘UninstallString’ value.
Place this string value into the uninstall script.
12
Configure OS Settings Example
Create, or Edit Registry settings using ‘reg’ command. For help, type ‘reg /?’ at a command prompt.
reg add HKLM\Software\UGS /v LICENSESERVER /d 28000@licserver
reg import NX5_defaults.reg
reg query
Set System Variable
Add ‘tools’ directory to system %PATH%
setx Path "%Path%;C:\CAxPLM\tools" -m
‘setx’ is a Windows Resource Tool Kit utility available for free from Microsoft’s website.
13
Check for Successful Install Example
Install NX5 and check to see if it was installed successfully before continuing.
15
Create Directories and Set File Permissions Example
Create model file directory and set permissions on it to full control for CAD users and managers.
16
Create Scheduled Tasks Example
Create a Scheduled Task to execute a nightly maintenance routine such as defragmenting a hard drive or backing up local user files.
17
Preset Firewall Exceptions Example
Preset firewall exceptions to avoid the Block/Unblock dialog boxes and work around the I-DEAS 12 Orbix bug.
18
Apply Patches Example
Update NX5 with a Maintenance Release
Update Teamcenter 2007.1 Visualization to MP2
19
Putting It All Together
Install Scripts that I have available to share:
NX5, Patches, Documentation, & Prerequisites
NX I-DEAS 5, Help Library, SFAM, & Prerequisites
Teamcenter Visualization 2007.1
NX Nastran 5.1 & Documentation
TCEng 2005SR1 2-Tier Client Install using TEM.
TCII5.0
To get copies of these script for your use, send me an email. You’ll have to taylor these scripts for your own use.
Top Related