#134521 - 2005-03-02 01:21 AM
Re: @wksta
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
At this point, I doubt the variable is defined at all, which may be where Les was headed with Sync/Asych issue...
One last test just to see:
Code:
? "Test 5: "
$output=wshpipe('%comspec% /c set',1)
for each $line in $output
if left($line,10 )="clientname"
$found=1
endif
next
if $found=1
"Var Exists"
else
"Var does not exist"
endif
Function WshPipe($ShellCMD, OPTIONAL $NoEcho)
Dim $oExec, $Output
$oExec = CreateObject("WScript.Shell").Exec($ShellCMD)
If Not VarType($oExec)=9 $WshPipe="WScript.Shell Exec Unsupported" Exit 10 EndIf
$Output = $oExec.StdOut.ReadAll + $oExec.StdErr.ReadAll
If Not $NoEcho $Output Endif
$WshPipe=Split(Join(Split($Output,CHR(13)),''),CHR(10))
Exit($oExec.ExitCode)
EndFunction
|
Top
|
|
|
|
#134522 - 2005-03-02 01:40 AM
Re: @wksta
|
Faithfulman
Getting the hang of it
Registered: 2005-02-22
Posts: 68
|
I think you may be right .... with that last snippet of code it returns:
Var does not exist
So, now what do I do.
?
Thanks for your help
|
Top
|
|
|
|
#134524 - 2005-03-02 05:24 PM
Re: @wksta
|
Anonymous
Anonymous
Unregistered
|
So are we saying that the previous posts of code ... use of EXPANDENVIRONMENTVARS ... were done incorrectly??
Because all of the above examples didn't return any value for %CLIENTNAME%.
|
Top
|
|
|
|
#134525 - 2005-03-02 05:33 PM
Re: @wksta
|
Faithfulman
Getting the hang of it
Registered: 2005-02-22
Posts: 68
|
The above message was mine. Forgot to login. Sorry.
|
Top
|
|
|
|
#134526 - 2005-03-02 10:13 PM
Re: @wksta
|
Faithfulman
Getting the hang of it
Registered: 2005-02-22
Posts: 68
|
Does anyone have a moment to help out?
|
Top
|
|
|
|
#134527 - 2005-03-02 10:17 PM
Re: @wksta
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Have you opened a DOS window on your Terminal server/Citrix desktop and typed "set" <enter> to see if that environment variable is there to use?
|
Top
|
|
|
|
#134529 - 2005-03-02 11:28 PM
Re: @wksta
|
Faithfulman
Getting the hang of it
Registered: 2005-02-22
Posts: 68
|
Thank you Les for all your hard work. I really could use this in the Login script.
Does anyone know how to push this variable into the initial login script??
Thanks,
Faithful
|
Top
|
|
|
|
#134530 - 2005-03-03 01:16 AM
Re: @wksta
|
Faithfulman
Getting the hang of it
Registered: 2005-02-22
Posts: 68
|
I've been thinking .....
Maybe that would work.
How could I tell the first Kix script to run a second script?
Thanks,
Faithful
|
Top
|
|
|
|
#134531 - 2005-03-03 01:25 AM
Re: @wksta
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Check out CALL..
For example -
CALL @SCRIPTDIR+'\yourscript.kix'
HTH,
Kent
|
Top
|
|
|
|
#134537 - 2005-03-03 09:36 AM
Re: @wksta
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Another solution is to use the CTXCINFO.EXE program I cobbled together some time ago to return client information, or Howard Bullocks helper DLLs.
The former definately returns the client name, and I suspect the latter does too.
The site that used to host ctxcinfo.exe is no longer available, so if you want it let me know and I will post it to you.
It was originally documented here
Information on Howards DLL can be found in the Citrix/Terminal Server FAQ.
|
Top
|
|
|
|
#134539 - 2005-03-03 05:41 PM
Re: @wksta
|
Faithfulman
Getting the hang of it
Registered: 2005-02-22
Posts: 68
|
Hi All,
Thanks for all your input, I do appreciate it.
I tried calling the second script from the first and Les you were right I got the same result.
Anyway, I need help than ... how would I do this:
Quote:
I think you have no recourse but to put it into a different script run at a later time in the logon sequence.
If I did the RegOnce thingy ... how is this accomplished.
Let me know.
Thanks,
Faithful
|
Top
|
|
|
|
#134540 - 2005-03-03 05:50 PM
Re: @wksta
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
You could try http://home.comcast.net/~habullock/Perlutilities.htm ClientData.exe and WshPipe UDF to get your information from the user's logon script if were to be execute in a Citrix/terminal server session.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 628 anonymous users online.
|
|
|