How can I query the system for session ID number when a terminal services session is on. I need that number to writte a key in the server registry in order to identificate and configurate in the right way, by a script, a shared printer. The key ends with the session number. Something like that:
HKEY_CURRENT_USER\Printers\DevModePerUser]
"HP LaserJet 4L/MARKO-001/Sesion 3" = hex:48,00,50,00,20,00,4c,00,61,00,73,00,65,\ 00,72,00,4a,00,65,00,74,00,20,00,34,00,4c,00,2f,00,41,00,53,00,45,00,52,00,\2d,00,30,00……………………………………………………………………………
In each session this "\session x" change his value. That's is why I need capture the string value. Anybody can help me? Thank's a lot
|