Hi.


Hope this is the right forum for this problem.

We have a logon script in our AD enviroment which runs in IE shell. Now
when users try to logon to Citrix Metaframe there's only cscript window
but nothing happens. The cscript window stays there as long as you want
to watch it. When you close it you are able to log on normally. If I
change the default script host to wscript.exe the script will never load
and the user cannot log on to metaframe. Normally that script is run by
wscript (without metaframe). I have looked that when the script is run
that wscript.exe and iexplore.exe processes start ok.

Now if I test logon with administrator rights the script loads and runs
fine with both cscript and wscript. Metaframe "Power Users" experience
the same problem.

Hmm.. I tested this script and it works fine:

wscript.echo "I suck 'cause I can't get it work :("


I don't know what would be the best solution, but could I run a
different script in terminal sessions? That would solve my problem, maybe...


/Arsi

RE: Logon script & Citrix Metaframe. by BvanZanten

BvanZanten
Wed Jun 01 02:50:03 CDT 2005

Hello Arsi,
maybe you should send in your code,
it just looks as if you have an endless loop in your code.
Also because your 1liner does work, it has nothing to do with the script
environment or Citrix environment itself.

Grtx,
Ben

"Arsi" wrote:

> Hi.
>
>
> Hope this is the right forum for this problem.
>
> We have a logon script in our AD enviroment which runs in IE shell. Now
> when users try to logon to Citrix Metaframe there's only cscript window
> but nothing happens. The cscript window stays there as long as you want
> to watch it. When you close it you are able to log on normally. If I
> change the default script host to wscript.exe the script will never load
> and the user cannot log on to metaframe. Normally that script is run by
> wscript (without metaframe). I have looked that when the script is run
> that wscript.exe and iexplore.exe processes start ok.
>
> Now if I test logon with administrator rights the script loads and runs
> fine with both cscript and wscript. Metaframe "Power Users" experience
> the same problem.
>
> Hmm.. I tested this script and it works fine:
>
> wscript.echo "I suck 'cause I can't get it work :("
>
>
> I don't know what would be the best solution, but could I run a
> different script in terminal sessions? That would solve my problem, maybe...
>
>
> /Arsi
>

Re: Logon script & Citrix Metaframe. by Arsi

Arsi
Thu Jun 09 04:42:13 CDT 2005

Hi Ben,

I got solution for my problem. Here it is:

''''''''''''''''''''''''''''''''''''''
If IsTerminalServerSession <> True Then
End If
'
'
'
'
''''''''''''''''''''''''''''''''''''''
Private Function IsTerminalServerSession

On Error Resume Next

Dim Sh
Dim x
Set Sh = CreateObject("WScript.Shell")
strCommandLine = "\\DC1\netlogon\Terminal.vbs"
x = LCase(Sh.ExpandEnvironmentStrings("%Clientname%"))
If (x <> "") And (x <> "console") And (LCase(x) <> "%clientname%") Then

IsTSSession = True

Sh.Run(strCommandLine)

Call Cleanup
Else

IsTSSession = False

End If

End Function
''''''''''''''''''''''''''''''''''''''

Now when user logs on to terminal session he/she runs different script.
That actually is all we need, maybe not the best solutions. It works so
it's enough for me =)

-Arsi


B. van Zanten wrote:
> Hello Arsi,
> maybe you should send in your code,
> it just looks as if you have an endless loop in your code.
> Also because your 1liner does work, it has nothing to do with the script
> environment or Citrix environment itself.
>
> Grtx,
> Ben