Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Checking for terminal services?

Checking for terminal services?

Scheduled Pinned Locked Moved IT & Infrastructure
comsysadminhelpquestionlounge
2 Posts 2 Posters 14 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Russell Jones
    wrote on last edited by
    #1

    I don't really know where to post this so I thought general IT would be the best place. I'm playing with an installer which seems to have a problem installing on Terminal Services machines. So people installing software on Terminal servers should know about change user /install or running from Add/Remove programs but it appears this is not always the case. I found this handy page http://msdn.microsoft.com/en-us/library/ms724833[^] and now I know that the machine is a terminal server and whether it's in single user terminal services mode. It doesn't however tell me if the server is setup as a remote administration server or a full on application server. Does anyone know of a call that would tell me which terminal services mode the server is in? Cheers Russell

    L 1 Reply Last reply
    0
    • R Russell Jones

      I don't really know where to post this so I thought general IT would be the best place. I'm playing with an installer which seems to have a problem installing on Terminal Services machines. So people installing software on Terminal servers should know about change user /install or running from Add/Remove programs but it appears this is not always the case. I found this handy page http://msdn.microsoft.com/en-us/library/ms724833[^] and now I know that the machine is a terminal server and whether it's in single user terminal services mode. It doesn't however tell me if the server is setup as a remote administration server or a full on application server. Does anyone know of a call that would tell me which terminal services mode the server is in? Cheers Russell

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi Russel, You could read the %SESSIONNAME% environment variable with the GetEnvironmentVariable Function[^] and check the first three letters for 'RDP'. http://www.codeproject.com./Messages/3217969/Re-How-to-know-that-the-programmatically-that-the-.aspx[^] You could probably go a longer route by calling ProcessIdToSessionId with GetCurrentProcess() and pass the resulting session ID along to WTSQuerySessionInformation. But it just seems so much easier reading the environment variable. Best Wishes, -David Delaune

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups