MSTerminalServices.org Forums

Forums Home | FAQ | Search | Profile | Private Messages | Log in/Register/Password

How to check if a program runs unter terminal services?

Page 1 of 1
Next:  General Discussions: TS And HP LaserJet P1505 Printer - Redirection Does Not Work  
Author Message
Franc Walter

External


Since: May 22, 2007
Posts: 4



(Msg. 1) Posted: Sat Mar 29, 2008 10:28 am
Post subject: How to check if a program runs unter terminal services?
Archived from groups: microsoft>public>windows>terminal_services (more info?)

Hello,
how can i check if a program is started under Terminal Services (or
Remote Desktop)?
Thanks,
franc
Back to top
Send e-mail Login to vote
Vera Noest [MVP]

External


Since: Sep 07, 2003
Posts: 9431



(Msg. 2) Posted: Sat Mar 29, 2008 10:28 am
Post subject: Re: How to check if a program runs unter terminal services? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Check this:

How can my script / application detect if it is running in a Terminal
Services client session?
http://ts.veranoest.net/ts_faq_applications.htm#DetectRemoteSession

_________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
TS troubleshooting: http://ts.veranoest.net
___ please respond in newsgroup, NOT by private email ___

Franc Walter <francwalter RemoveThis @gmx.de> wrote on 29 mar 2008 in
microsoft.public.windows.terminal_services:

> Hello,
> how can i check if a program is started under Terminal Services
> (or Remote Desktop)?
> Thanks,
> franc
Back to top
Send e-mail Login to vote
Franc Walter

External


Since: May 22, 2007
Posts: 4



(Msg. 3) Posted: Sat Mar 29, 2008 3:52 pm
Post subject: Re: How to check if a program runs unter terminal services? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you Vera, that works:

BOOL bIsRemoteSession = GetSystemMetrics( SM_REMOTESESSION );

By the way, the GetSystemMetrics is in user32.dll

Yours,
franc
Back to top
Send e-mail Login to vote
Display posts from previous:   
    All times are: Eastern Time (US & Canada) (change) Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Looking for more Terminal Services info?

Sign up to the MSTerminalServices.org Monthly Newsletter, written by Terminal Server MVP & Citrix CTP Stefan Vermeulen, containing news, tips, interviews, links of the month and much more. Subscribe today and don't miss a thing!

Become an MSTerminalServices.org member!

Discuss your Terminal Services & Citrix issues with thousands of other SBC experts. Click here to join!

Community Area

Log in | Register