Title: Scripting Automated Solutions for Siemens PLM Software
1Scripting Automated Solutions for Siemens PLM
Software
By Daniel Cortez Jet Propulsion
Laboratory,California Institute of Technology
2Intro
- AUTOMATION noun
- The technique, method, or system of operating or
controlling a process by highly automatic means,
as by electronic devices, reducing human
intervention to a minimum.
3JPL Product Management
- The Mechanical CAE Group at JPL manages
configuration for 180 workstations with various
SIEMENS products (NX, Teamcenter Engineering,
Nastran, Ideas, etc) - MCAE has automated the installation of all
SIEMENS products via web links and small
installation programs. - Cost Saving with the automated installation was
90 reduction in installation times, per single
installation.
4Automating Installations, Why?
- Allow user to download and run installation On
Demand - Scripted installation identifies all necessary
parameters. - Install only licensed modules
- Standardize workstation installations
5JPL Typical Design Installation Package CAD/CAM
Design Engineers
- installation package for Design Engineering
- NX Base
- NX Translators (pre NX5)
- NX Maintenance Release Update
- NX Maintenance Pack Update
- JPL Custom Configuration Files
- Teamcenter Engineering Base
- Teamcenter Engineering Portal Client
- Teamcenter Engineering Portalviewer (JT, CGM,..)
- Teamcenter Engineering Base Update
- Teamcenter Engineering Portal Client Update
- Teamcenter Engineering Portalviewer Update
- JPL Custom Configuration Files
6Knowledge Required
- This session will require user to be experienced
and knowledgeable in the following. - Command Shell / Windows Batch Scripting (.BAT,
.CMD) - Windows Registry Editing
- Application Installation
- NX
- Teamcenter Engineering Client
- Nastran
- FEMAP, etc
6
7Scripting Languages
- Batch Scripting
- Windows Batch file scripting - useful for running
a sequence of executables automatically - Scripting Concepts and Technologies
- VBScripting - easy-to-use scripting language that
enables you to create powerful tools for managing
computers. - WSH - is a powerful multi-language scripting
environment ideal for automating system
administration tasks - WMI - primary management technology for Microsoft
Windows OS. It enables consistent and uniform
management, control, and monitoring of systems
throughout your enterprise.
8Identifying Install executables
- Most product installation come packaged in either
.MSI or .EXE format. Each format has methods
which can be used to perform silent or unattended
installations. - MSI
- The Windows Installer (aka Microsoft Installer)
is an engine for the installation, maintenance,
and removal of software on Windows systems. The
installation information, and often the files
themselves, are packaged in installation packages
- The package files have a .msi extension, and you
manipulate them using the msiexec utility. - EXE
- The InstallShield setup.exe allows for a response
file (.iss) to be used for unattended
installations (silent installation) - Note not all installation will are capable of
using scripted file.
8
9Example NX
- NX can be deployed in one of two methods
- Setup.exe
- UGS NX 4.0.msi
- SETUP.EXE
- This is Manual installation. The installation
will run with full windows dialog interaction,
requires input for all fields. - UGS NX 4.0.msi
- Allows for manual or scripted installation. If
parameters are not provided it defaults to manual
mode installation.
10Automated Installation Options
- Reference NX Installation Guide
- The unattended installation is controlled by the
Windows system component, msiexec.exe. In order
to install silently you must pass switches and NX
specific configurable properties to msiexec.exe
on the command line. The msiexec.exe program has
several command line switches. For full
documentation on these switches, see the
Microsoft help documentation Help and Support
for msiexec
11MSIEXEC Line Switches
- /I - specifies the input .msi file to be used
- msiexec.exe /i UGS NX 4.0.msi
- /q - specifies the UI level.
- /qn specifies no dialogs except for the ending
install done dialog recommended. - /qn specifies a silent installation with no
dialogs. - no indication when the install completes
- /L specifies a log file to be created
- msiexec /Lv logfile
- /x - specifies the msi file use for
uninstallation. - msiexec.exe /x UGS NX 4.0.msi
12NX MSI Installation Parameters
- The configurable properties for the NX install
are - ADDLOCAL This property selects the features to
be installed. - ALL same as a typical installation.
- SETUPTYPE - matches the addlocal parameter
- SETUPTYPEtypical.
- LICENSESERVER
- This property sets the value of the NX license
server. - Set the environment variable UGII_LICENSE_FILE
- LANGUAGE
- User interface language for NX.
- INSTALLDIR
- This property sets the directory where NX will be
installed.
13MSI Example Installation NX 4
- Product NX 4
- Note
- The msiexec.exe examples below may appear on
multiple lines because of document formatting but
they must be entered on your computer as one
line.
msiexec /qn /i "NX 4.msi" ADDLOCAL"all
INSTALLDIRC\UGS\NX30 LICENSESERVER27000_at_hostn
ame
msiexec /qn /i "NX 4.msi" ADDLOCAL"all
INSTALLDIRC\UGS\NX30 LICENSESERVER27000_at_ho
stname
14Example FEMAP
- FEMAP can be deployed in one of two methods
- Setup.exe
- Setup.exe (with response file)
- Reponse file filename.iss
- SETUP.EXE
- This is Manual installation. The installation
will run with full windows dialog interaction,
requires input for all fields. - A response file can be used to pass all the
parameters. Admin install must be performed first
to create the response.
15Generate the ISS Response File
- InstallScript Installations (EXE)
- For an InstallScript-based installer, The user
performs a complete installation inputting all
the necessary values. Instead of directly passing
the values of variables to the installer, - Perform the following steps
- 1. On a test system, run the installation in
record mode (/r), which generates a response file
(filename.iss) - 2. On an end user's system, run the installation
in silent mode, using the data from the response
file.
16Example Generate Response File
- To generate the response file, you run the
InstallScript setup.exe with the /r switch. This
displays the installer's dialog boxes, and
additionally records the data you enter in the
dialog boxes. A response file uses the .iss (for
"InstallShield silent") file name extension you
can specify the name and location of the response
file using the /f1 switch.
setup /r /f1"C\sample\setup.iss"
17InstallShield Example FEMAP 9.3.1
- Product FEMAP 9.3.1
- Note
- The msiexec.exe examples below may appear on
multiple lines because of document formatting but
they must be entered on your computer as one
line.
Setup.exe /s /f1FEMAP931_Setup.iss"
18Batch File Create automatic
- Create a windows batch file .bat to capture all
the parameters to automate an installation. - Use notepad to create a new text file with the
extension .bat - The first line in the batch file
- _at_ECHO OFF
19Example Batch File FEMAP
FILE SETUP_FEMAP.bat
_at_echo off Setup.exe /s /f1FEMAP931_Setup.iss"
20Example Batch File NX
FILE INSTALL_NX4.bat
_at_echo off msiexec /qn /i "NX 4.msi"
ADDLOCAL"all INSTALLDIRC\UGS\NX30
LICENSESERVER27000_at_hostname
21References
- Online
- Microsoft Scripting Guide
- http//www.microsoft.com/technet/scriptcenter/guid
e - Microsft Script Center
- http//www.microsoft.com/technet/scriptcenter
- Books
- MSDN Forums
- Free downloads
- Activestate
- Microsoft powershell
21
22Questions
Daniel Cortez decortez_at_jpl.nasa.gov