Page 1 of 1 1
Topic Options
#211028 - 2016-01-08 03:46 PM Script no longer reading registry value
travism Offline
Just in Town

Registered: 2016-01-08
Posts: 2
Loc: Northern California
First off pretty new to scripting and have inherited this logon script that has been in place for a few years with no issues. I was tasked with building up a new Citrix environment since our current one is several years out dated with no upgrade path. Using the existing script in the new environment seems to work just fine with the exception of the part of the code where we're trying to pull values from the registry & write those values to a text file. The one major difference between the old & new Citrix is the new is Win7 64bit, where the old was x86 Win7. We're using KiXtart 2010 4.66.

I'm hoping that it's something simple we are missing and one of you experts can point that out. Thanks in advance!

Here is the snipet of the script...

 Code:
If (@TSSESSION <> 1)
	; client ip extraction from vm
	$ClientAddress = ReadValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA\Session", "ClientAddress")
        $ClientName = ReadValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA\Session", "ClientName")
	
	If $ClientAddress <> ""
	IF EXIST ("%SystemDrive%\is\-GetThinClient.TXT")
		Del "%SystemDrive%\is\-GetThinClient.TXT"
	Endif
	writeprofilestring("%SystemDrive%\is\-GetThinClient.TXT", "CLIENT", "Name","$ClientName")
	writeprofilestring("%SystemDrive%\is\-GetThinClient.TXT", "CLIENT", "IP","$ClientAddress")
	writeprofilestring("%SystemDrive%\is\-GetThinClient.TXT", "VIRTUAL", "Name","@Wksta")
	writeprofilestring("%SystemDrive%\is\-GetThinClient.TXT", "VIRTUAL", "IP","@IPAddress0")
	EndIf
Endif

Top
#211029 - 2016-01-08 04:02 PM Re: Script no longer reading registry value [Re: travism]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
Try setting this option
$RC=setoption("WOW64AlternateRegView","On")

Kixtart is a 32bit app, and by default will look in HKLM\Software\Wow6432node on 64bit Windows.

Top
#211030 - 2016-01-08 04:16 PM Re: Script no longer reading registry value [Re: Allen]
travism Offline
Just in Town

Registered: 2016-01-08
Posts: 2
Loc: Northern California
Just tested & confirmed it works with that addition. THANK YOU, THANK YOU, THANK YOU!!!
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1376 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.052 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org