ICApp(3,1) = "ICServerManagerApps_20XX_RX.msi"
strValueName = "DisplayName"
'sets defaultTempDir to user temp directory
defaultTempDir = wshell.ExpandEnvironmentStrings(envShell("TEMP"))
'------------------------------ Configurable parameters ---------------------------------------------
'set to 0 to uninstall ICBM, 1 to uninstall ICUApps_32, 2 to uninstall
ICUApps_64, 3 to uninstall ICSM, 4 to uninstall ICWC
AppToUninstall=1
'default log directory is the user temp directory. This may be windows\temp
if run under LocalSystem
'if change is desired, the logDir variable should be in quotes like this:
'logDir="c:\temp"
logDir=defaultTempDir
'Set to false to disable logging
logInstall=True
'----------------------------------------------------------------------------------------------------
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
& ICApp(AppToUninstall,0) & "\"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
'gets msi file's root name (used in naming the logfile)
rootName=mid(ICAPP(AppToUninstall,1),1,len(ICAPP(AppToUninstall,1))-4)
'creates a timestamp to make log name unique
makeTimestamp=Year(Now) & Month(Now) & Day(Now) & Hour(Now)
& Minute(Now) & Second(Now)
'Installs the product if it is not installed. If it is installed, does
nothing.
If Not IsNull(dwValue) Then
'command line to uninstall the product
commandLine="msiexec /x " & ICApp(AppToUninstall,0)
'adds logging to command line if LogInstall is set to
"true"
If(logInstall) Then
commandLine=commandLine & "
/l*vx " & Chr(34) & logDir & "\" & rootName
& "_uninstallLog_" & makeTimeStamp & ".log"
& Chr(34)
End If
'adds switch for quiet execution (no UI)
commandLine=commandLine & " /qn"
'the window is hidden and the script waits until the
install is finished before continuing
r=wshell.run(commandLine,0,true)
End If
Set WShell = Nothing
Set objRegistry = Nothing
Set envShell = Nothing
Sample Upgrade script for CIC client workstation applicationsSample Upgrade script for CIC client workstation applications
This script is provided as an example of how a script can be used to upgrade 3.0 client workstation applications to 2015 R1 or later.
If the existing 3.0 client workstations are localized, the script enables the user to install 2015 R1 or later Language Plugins for the
existing installed languages.
The script is heavily commented and should be self-explanatory. There is a section titled "Configurable parameters" containing
parameters that the user can set to control which install is run as well as specify the path to the .msi file, the application to install,
a flag to disable logging and the logging directory path. Optional values that can be set are the CIC Server name, the installation
directory, and the path to the transform file, if one is used.
The script checks to see if the application is already installed and if it is, it simply exits. By default, the install log will be written to
the user's TEMP directory and will be in the form of <installName>_installLog_<timestamp>.log.
The sample upgrade script is provided below:
--------------------------------------------------------------------------------------------
This script is a modified version of the client install script. It has
been changed to install the client patch and the language plugin