200 likes | 310 Views
Using Silent Install Scripts to Deploy Software to MS Windows PCs. Larry Carpenter, P.E. CAx Administrator / FE Analyst Siemens Healthcare Molecular Imaging Division Hoffman Estates, IL 60192 larry.carpenter@siemens.com (847) 304-SDRC (7372). Topics. The Need For Install Scripts
E N D
Using Silent Install Scripts to Deploy Software to MS Windows PCs.Larry Carpenter, P.E.CAx Administrator / FE AnalystSiemens HealthcareMolecular Imaging DivisionHoffman Estates, IL 60192larry.carpenter@siemens.com(847) 304-SDRC (7372)
Topics • The Need For Install Scripts • Why Use Windows Batch Scripting? • Silent Install Methods • Usage & Syntax Examples • Complete Install Scripts
The Need for Install Scripts Manually installing various types of software on multiple PCs is: Time consuming Error plone BOOOOOORRRRRRIIIIIIIINNNNNGGGG!!! Error Prone 3
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. 4
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 Obsolete % 5
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. 6
Creating a Simple Install Script 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. Place the newly created batch file in a network location accessible by each client. On every PC, double click the batch file to begin the install. 7
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) 8
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. 9
Check for Existing Program Example Check for existence of Java 1.5.0_06 and route as necessary. 10
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. 11
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. 12
Check for Successful Install Example Install NX5 and check to see if it was installed successfully before continuing. 13
Copy Customizations Example You can perform client side customizations. 14
Create Directories and Set File Permissions Example Create model file directory and set permissions on it to full control for CAD users and managers. 15
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. 16
Preset Firewall Exceptions Example Preset firewall exceptions to avoid the Block/Unblock dialog boxes and work around the I-DEAS 12 Orbix bug. 17
Apply Patches Example Update NX5 with a Maintenance Release Update Teamcenter 2007.1 Visualization to MP2 18
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. 19
Thank You!Contact Info:larry.carpenter@siemens.com847-304-7372