The purpose of this document is to create a silent install for CST Studio Suite 2012. This document also describes         how to: 

  • Disable the 'Automatically check for updates' option
  • Configure license details
  • Update the application using SUP patch file(if provided)
  • Set CST_WORK environment variable
  • Set Global CachePath

To achieve given above tasks, we need to make following changes to MSI:

1.    Disable the 'Automatically check for updates' option:

Edit this registry in MSI to

 

[HKEY_LOCAL_MACHINE\SOFTWARE\CST AG\CST DESIGN ENVIRONMENT\2012]

"AUTO_UPDATE_ACTIVE"=""

 

[HKEY_LOCAL_MACHINE\SOFTWARE\CST AG\CST DC Solver Control 2012\Usersettings]

"AutomaticUpdates"="false"

 

2.    Configure license details

This too can be achieved using two methods:

  1. By editing registry :

 

Edit this registry to

[HKEY_LOCAL_MACHINE\SOFTWARE\CST AG\CST DESIGN ENVIRONMENT\2012]

                                “LICENSESERVER” = “@LicenseServerNAME “

  1. Using CSTSettings.exe installed with package

 

Write a Custom Action(with apt name) just before InstallFinalize in ImmediateExecute to run :

 

“C:\Program Files (x86)\CST STUDIO SUITE 2012\CSTSettings.exe” floating @LicenseServerNAME

 

3.    Update the application using SUP patch file

 

This can be achieved using VBSscript but it’s better to use AUTOIT utility to create a script to automate the whole process. Also create a folder under %temp% named CST and keep .SUP patch file under this folder using MSI. Write a Custom Action(with apt name) just before InstallFinalize in ImmediateExecute for this task too.

 

The command is:

%programfiles%\Auto_Update_Control.exe updatefromdir:"<path to update file>"

 

The AutoIt Script to achieve this task is given below, complie it and keep the resultant EXE in %Programdata%\CST. Write a Custom Action(with apt name) just before InstallFinalize in ImmediateExecute for this task.

 

Opt("WinWaitDelay",100)

Opt("WinDetectHiddenText",1)

Opt("SendKeyDelay", 5)

dim $winhandle,$path,$path1,$OS

 

$OS = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "PROCESSOR_ARCHITECTURE")

If $OS = "AMD64" Then

                $path = EnvGet ( "ProgramFiles(x86)") & "\CST STUDIO SUITE 2012\Auto_Update_Control.exe"

Else

                $path = EnvGet ( "ProgramFiles") & "\CST STUDIO SUITE 2012\Auto_Update_Control.exe"

EndIf

 

$path1 = EnvGet ( "Temp") & “\CST"

Run($path & " updatefromdir:" & $path1, "",@SW_HIDE)

 

WinWait("CST Automatic Software Update")

While 1

Sleep(2000)

WinActivate("CST Automatic Software Update","")

$winhandle=WinGetHandle("CST Automatic Software Update","")

ControlFocus($winhandle, "", "Button1")
ControlSend($winhandle, "", "Button1","{ENTER}")
If Not WinExists("CST Automatic Software Update") Then

exit

Endif

Wend

4.    Set CST_WORK environment variable

 

This environment variable sets the working directory for the application. This can be set to any folder as requested by customer such as “C:\Temp\CST_WORK”.

 

Create a system environment variable named CST_WORK with

Value = C:\Temp\CST_WORK

On Install=Set

Placement=Append

On Uninstall=Remove

 

Also apply Change permissions to USER on this folder else the application will throw error while launching.

 

5.    Set Global CachePath

To set GlobalCachePath, add following registry to MSI:

[HKEY_LOCAL_MACHINE\SOFTWARE\CST AG\CST DESIGN ENVIRONMENT\Usersettings]

“GlobalCachePath” = “C:\Cache”

 

NB : The article was created using this links: 

http://www.wolftech.ncsu.edu/support/support/SCCM_tips_and_info

http://www.myangrydome.com/?p=1488