Jump to content

Recommended Posts

Posted

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.

Posted

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?

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...