In your scripts, why not just reference it directly, rather than being worried about it being set as an environment variable. As well as what Brian recommended, you could also run query user and parse the output. Depends on how involved, and how capable you are at scripting. Neil > -----Original Message----- > From: chris.de.jongh@xxxxxxxxxx [mailto:chris.de.jongh@xxxxxxxxxx] > Sent: 15 January 2004 10:26 > To: thin@xxxxxxxxxxxxx > Subject: [THIN] SessionID in in HKCU\Volatile Environment > > Hi, > > I'm having an intersting question and I hope someone can help > me. As you can see below several user environment settings > are created. > > Windows Registry Editor Version 5.00 > [HKEY_CURRENT_USER\Volatile Environment] > "LOGONSERVER"="\\\\SBSADMIN01D" "CLIENTNAME"="SBSADMIN-dadejongch" > "SESSIONNAME"="ICA-tcp#40" > "APPDATA"="C:\\Documents and Settings\\dadejongch\\Application Data" > > Is there any way to add the current sessionID of the logged > in user so it can be referecned from the users environment > (ex. %SESSIONID% in scripts). I would like to have the following > > Windows Registry Editor Version 5.00 > [HKEY_CURRENT_USER\Volatile Environment] > "LOGONSERVER"="\\\\SBSADMIN01D" "CLIENTNAME"="SBSADMIN-dadejongch" > "SESSIONNAME"="ICA-tcp#37" > "APPDATA"="C:\\Documents and > Settings\\dadejongch\\Application Data" "SESSIONID"="1" > > SESSION must be the same ID number as viewed by qwinsta > command in a dos box see below > > qwinsta > SESSIONNAME USERNAME ID STATE TYPE > DEVICE > console 0 Conn wdcon > ica-tcp 65536 Listen wdica > rdp-tcp 65537 Listen rdpwd > >ica-tcp#37 dadejongch 1 Active wdica > 5 Idle > 3 Idle > > I'm looking forward to get some feedback from the guru's. > > Tnx > > Chris *********************************************** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. ************************************************ ******************************************************** This Week's Sponsor - RTO Software / TScale What's keeping you from getting more from your terminal servers? Did you know, in most cases, CPU Utilization IS NOT the single biggest constraint to scaling up?! Get this free white paper to understand the real constraints & how to overcome them. SAVE MONEY by scaling-up rather than buying more servers. http://www.rtosoft.com/Enter.asp?ID=147 ********************************************************* Useful Thin Client Computing Links are available at: http://thethin.net/links.cfm *********************************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link: http://thethin.net/citrixlist.cfm