PsychOfMSE Posted September 4, 2013 Share Posted September 4, 2013 FileInstall("C:\AutoItCitrix\CitrixOnlinePluginFull.exe",@TempDir) FileInstall("C:\AutoItCitrix\CitrixUpdate.bat",@TempDir) If @OSArch = "X86" Then $regAddress = 'HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine' $regKey = 'ClientName' $regPath_x86 = RegRead($regAddress,$regKey) FileChangeDir(@TempDir) RunWait("CitrixUpdate.bat") FileChangeDir(@TempDir) RunWait('CitrixOnlinePluginFull.exe ADDLOCAL="ICA_Client,PN_Agent,SSON" SERVER_LOCATION="' $CmdLine[2] '"') RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine", "ClientName", "REG_SZ", $regPath_x86) RegWrite("HKEY_CURRENT_USER\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine", "ClientName", "REG_SZ", $regPath_x86) Else $regAddress = 'HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine' $regKey = 'ClientName' $regPath_x64 = RegRead($regAddress,$regKey) FileChangeDir(@TempDir) RunWait("CitrixUpdate.bat") FileChangeDir(@TempDir) RunWait('CitrixOnlinePluginFull.exe ADDLOCAL="ICA_Client,PN_Agent,SSON" SERVER_LOCATION="' $CmdLine[2] '"') RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine", "ClientName", "REG_SZ", $regPath_x64) RegWrite("HKEY_CURRENT_USER\SOFTWARE\Wow6432NodeCitrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine", "ClientName", "REG_SZ", $regPath_x64) EndIf Here's my current script. I now need to convert this to a MSI package so we can push it out through SCCM. How do I go about passing a command line variable during install through an .msi into this script? Is it possible? Thanks! Link to comment Share on other sites More sharing options...
Cravin Posted September 4, 2013 Share Posted September 4, 2013 Brief session with google showed me this from Stackoverflow: http://stackoverflow.com/questions/854873/how-to-make-an-msi-that-simply-wraps-an-exe-file Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 4, 2013 Moderators Share Posted September 4, 2013 While I am all for proper application repackaging, can I ask why you need an MSI? Unless you are copying files other than your script itself, or are making a number of system/registry changes, SCCM should be able to handle just the .exe just fine. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
PsychOfMSE Posted September 4, 2013 Author Share Posted September 4, 2013 (edited) The MSI wrapper is required by corporate policy. Not sure why, but our SCCM team is extremely strict with this requirement. I can wrap it in an .msi wrapper just fine, but my problem lies in the $CmdLine[2] pass through in: RunWait('CitrixOnlinePluginFull.exe ADDLOCAL="ICA_Client,PN_Agent,SSON" SERVER_LOCATION="' $CmdLine[2] '"') This is vital for passing citrix command line switches through into the executable. If I wrap this in an .msi will the passthrough still occur? Following scenario: Re-Wrap to .msi and run the following command in SCCM: CHI_LR_Citrix_Upgrade.msi /silent ADDLOCAL="ICA_Client,PN_Agent,SSON" SERVER_LOCATION="http://xenapp" ENABLE_DYNAMIC_CLIENT_NAME="NO" Will "/silent ADDLOCAL="ICA_Client,PN_Agent,SSON" SERVER_LOCATION="http://xenapp" ENABLE_DYNAMIC_CLIENT_NAME="NO"" still be passed through to $CmdLine[2] ? Edited September 4, 2013 by PsychOfMSE Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now