Checking for terminal services?
-
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
-
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
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