#202415 - 2011-06-06 12:01 PM
Re: how to read a custom environment variable (XDClientName)
[Re: Mart]
|
arjanv
Fresh Scripter
Registered: 2010-03-11
Posts: 49
Loc: netherlands
|
what do you mean? i've used the code as it is.
|
Top
|
|
|
|
#202417 - 2011-06-06 01:53 PM
Re: how to read a custom environment variable (XDClientName)
[Re: Mart]
|
arjanv
Fresh Scripter
Registered: 2010-03-11
Posts: 49
Loc: netherlands
|
?
the session name is on both "console". If it was different then we didn't need the xdclientname right?
|
Top
|
|
|
|
#202419 - 2011-06-06 03:44 PM
Re: how to read a custom environment variable (XDClientName)
[Re: Glenn Barnas]
|
arjanv
Fresh Scripter
Registered: 2010-03-11
Posts: 49
Loc: netherlands
|
hi,
did you find something hoe to solve this?
thanks
|
Top
|
|
|
|
#202427 - 2011-06-06 06:16 PM
Re: how to read a custom environment variable (XDClientName)
[Re: ShaneEP]
|
arjanv
Fresh Scripter
Registered: 2010-03-11
Posts: 49
Loc: netherlands
|
huh! wtf?! none of your sugestions work. you call youself "citrixman" we've got here 3 pages without a working solution, but it seems you know the answer. but won't tell it? If it was that easy i wouldn't ask for it nor we have 3 pages needed.........1 reply was enough. but apperently it isn't that simple.
The work of Glenn is super.
|
Top
|
|
|
|
#202430 - 2011-06-06 10:27 PM
Re: how to read a custom environment variable (XDClientName)
[Re: Mart]
|
arjanv
Fresh Scripter
Registered: 2010-03-11
Posts: 49
Loc: netherlands
|
about info? maybe you've missed post 1 and 16. (no offence)
i'm not attacking anyone.
i don't know hot to figure out how to sepparate the physical client from the virtual one, neither do you....it seems.
theer is no different session type. the physical client is locked down with the citrix lockdown tool, so the physical client are presenting the virtual desktop logon screen.
it's possivle with the citrix session printers but this doesn't work always smooth. adn it's not very clear and messy. so i like kix way better.
yes maybe i'm stupid........i admit, but that doesn't mean i can't ask for specific help.
this is a decent forum, so don't say crap like..........just google. that is what a lot of people yells at forums....that's the easyest way.
right:)
|
Top
|
|
|
|
#202432 - 2011-06-07 12:06 AM
Re: how to read a custom environment variable (XDClientName)
[Re: Mart]
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
|
Mart,
Just to clarify, the XD4ClientName.exe can't be run from within Kix.. it sets an environment var that exists only within the subshell. It really must be called before running Kix to work. Calling it from WSHPipe might work, but it really would work best if WSHPipe called a bat file that called the EXE and then echo'd the environment var, so that WSHPipe only captured the variable data.
That said... one of the quickest ways to ostracize oneself is to expect complete answers to problems. Mart, Shane, and I have all posted examples based on what we know (in general about Citrix/Xen and specifically about what has been described. We all have an expectation that when someone asks for assistance, they will take the responses and try a few things, attempt some of the examples, and report back specific conditions.
The example that I posted will work, but requires you figure out how to define the batch file such that the XD4ClientName.exe runs only when logging onto a Xen server. Mart's Kix code won't work because the way the exe works, but his IDEAS ARE SPOT ON! His questions are valid! You need to try a few things on your own, in your specific environment. Something as simple as IF ^%COMPUTERNAME%^==^someXENserver^ xd4ClientName.exe - with one IF for each Xen server, then the command will run only if logging into a Xen server. Try it, let us know if it worked. If it doesn't, report the error messages, not just that it didn't work.
Bottom line, it's your problem in your environment, you'll need to get your hands dirty - more so that the rest of us, simply because you're there.
We're all here because we're willing to help. Most times, that help is in the form of sharing ideas. There's the occasional "silver platter" code, and if you figure this out, I'd be happy to post the result in the code vault to help the next person struggling with this.
Glenn
_________________________
Actually I am a Rocket Scientist!
|
Top
|
|
|
|
#202433 - 2011-06-07 01:18 PM
Re: how to read a custom environment variable (XDClientName)
[Re: Mart]
|
arjanv
Fresh Scripter
Registered: 2010-03-11
Posts: 49
Loc: netherlands
|
Questions:- Do your xen servers have a specific naming layout that can be used to identify them (xenserver01, 02, etc...) or something like it? Maybe they are in a specific IP range or is there anything else specific to the xen servers that can be used to identify them in kix?
- Is the clientname environment variable available in the virtual desktop session? If so then it might be useful to identify the client and set printers based on the client name. You can use the xd4clientname application but if it is available as an environment var then this is much easier.
we have a Provisioning server named(computername): va-ctx-prs1 and a presentation server named(computername): va-ctx-ddc1 virtual clients have the computername: va-ctx-001 ~ 200
without running xdclient the clientname environment variable is not available, when running xdclient(with error popup) the xdclient variable is present.
thanks
|
Top
|
|
|
|
#202436 - 2011-06-08 09:49 AM
Re: how to read a custom environment variable (XDClientName)
[Re: Glenn Barnas]
|
arjanv
Fresh Scripter
Registered: 2010-03-11
Posts: 49
Loc: netherlands
|
I'll try this tomorrow, but i doubt if this will work, because users don't logon to a xen server. all users logged on to the same domaincontroller, or do i missing something here.
somehow i need xdclient to run when the (virtual)client computername begins with the VA-CTX and the load the kix script.
ps. does a loginscript loads earlier than a gpo logonscript? or doesn't that matter?
maybe a crappy solution, but also could try to load the script on the virtual client inself from example the "startup" folder.
|
Top
|
|
|
|
#202437 - 2011-06-08 09:56 AM
Re: how to read a custom environment variable (XDClientName)
[Re: Mart]
|
arjanv
Fresh Scripter
Registered: 2010-03-11
Posts: 49
Loc: netherlands
|
Thanks, looks promissing, i'll going to test this also tomorrow.
as an reply on NTDOC. my apologise, i'm deeply sorry, at first i found the citrixmans response also not nice.
|
Top
|
|
|
|
#202439 - 2011-06-08 10:11 PM
Re: how to read a custom environment variable (XDClientName)
[Re: Mart]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
Maybe thinking too simple here but:
If Left(@WKSTA,6) = "VA-CTX" AND CInt(Right(@WKSTA,3)) < 1000
;Do Stuff
EndIf
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1574 anonymous users online.
|
|
|