PsychOfMSE Posted September 4, 2013 Share Posted September 4, 2013 Here's my script: FileInstall("C:\AutoItCitrix\CitrixOnlinePluginFull.exe",@TempDir) FileInstall("C:\AutoItCitrix\CitrixUpdate.bat",@TempDir) FileChangeDir(@TempDir) RunWait("CitrixUpdate.bat") 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('CitrixOnlinePluginFull.exe ADDLOCAL="ICA_Client,PN_Agent,SSON" ENABLE_DYNAMIC_CLIENT_NAME="No" CLIENT_NAME='$regPath_x86' SERVER_LOCATION="Http://xenapp"') 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('CitrixOnlinePluginFull.exe ADDLOCAL="ICA_Client,PN_Agent,SSON" ENABLE_DYNAMIC_CLIENT_NAME="No" CLIENT_NAME='$regPath_x64' SERVER_LOCATION="Http://xenapp"') Basically what I need to do is pull the "ClientName" value from the registry and insert it into the "Client_Name" command line switch in the "RunWait" line. What am I doing wrong? How would I go about inserting the readout of the Reg Value into the command line switch? Thanks so much guys! (I'm a noobie BTW!, please go easy on me. I've been doing nothing but searching and using the help file all day). This is my first script. Link to comment Share on other sites More sharing options...
michaelslamet Posted September 4, 2013 Share Posted September 4, 2013 Hi Psych, Untested, try this: RunWait('CitrixOnlinePluginFull.exe ADDLOCAL="ICA_Client,PN_Agent,SSON" ENABLE_DYNAMIC_CLIENT_NAME="No" CLIENT_NAME="' & $regPath_x86 & '" SERVER_LOCATION="Http://xenapp"') Same format for "Else" part Link to comment Share on other sites More sharing options...
PsychOfMSE Posted September 4, 2013 Author Share Posted September 4, 2013 Ah, now I see a new problem. The "CitrixUpdate.bat" file uninstalls any previous citrix installation which also removes the reg value I am trying to call in the install. Is there any way I can get around this? I guess I need to write the $regpath variable to be able to be called later? Link to comment Share on other sites More sharing options...
michaelslamet Posted September 4, 2013 Share Posted September 4, 2013 Yes, save/store it in a variable before the CitrixUpdate.bat run Link to comment Share on other sites More sharing options...
PsychOfMSE Posted September 4, 2013 Author Share Posted September 4, 2013 I assume that would be done like: $RegValue_x86 = Eval($regPath_x86) And then call the $RegValue_x86 variable? Link to comment Share on other sites More sharing options...
michaelslamet Posted September 4, 2013 Share Posted September 4, 2013 Simply read the regkey value before you run CitrixUpdate.bat $regAddress = 'HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine' $regKey = 'ClientName' $regPath_x86 = RegRead($regAddress,$regKey) If you want to give a variable a value, use like this: $var_A = $Var_B 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