Go Back  DVD Talk Forum > General Discussions > Tech Talk
Reload this Page >

Send email when Remote Desktop starts

Tech Talk Discuss PC Hardware, Software, Internet and Other Technology

Send email when Remote Desktop starts

Old 02-02-11, 11:42 AM
  #1  
Senior Member
Thread Starter
 
Join Date: Mar 2003
Posts: 789
Likes: 0
Received 0 Likes on 0 Posts
Send email when Remote Desktop starts

Like the title says. I would like my computer to send me an email every time a remote desktop connection starts.

I have a vbscript that can send an email with all the information I need, so that is fine. So, the question is, how do I run that vbscript when RD starts?
Old 02-02-11, 04:29 PM
  #2  
DVD Talk Hall of Fame
 
The Man with the Golden Doujinshi's Avatar
 
Join Date: Oct 2006
Location: Mister Peepers
Posts: 7,882
Likes: 0
Received 4 Likes on 4 Posts
Re: Send email when Remote Desktop starts

http://technet.microsoft.com/en-us/l...8WS.10%29.aspx
Old 02-02-11, 04:33 PM
  #3  
Senior Member
Thread Starter
 
Join Date: Mar 2003
Posts: 789
Likes: 0
Received 0 Likes on 0 Posts
Re: Send email when Remote Desktop starts

Thanks Peepers. I should have explained better what I need.
What you point to is the computer that is initiating the connection to run a program.
What I need is the computer that is being controlled to send an email (or run a program) basically informing me that it is being controlled. So, I want to run something on the client-side, not on the controlling side.
Old 02-02-11, 04:48 PM
  #4  
DVD Talk Ultimate Edition
 
Join Date: Jan 2001
Location: Seattle
Posts: 4,454
Likes: 0
Received 0 Likes on 0 Posts
Re: Send email when Remote Desktop starts

You need to script it through the event viewer in computer management. You can attach a task to an event. In this case you want to look for a "Logon" event and an event type of "3" (network logon). You can set it to email you when this event occurs.
Old 02-02-11, 04:48 PM
  #5  
DVD Talk Legend
 
Join Date: Jan 2000
Location: Region 1
Posts: 16,291
Likes: 0
Received 0 Likes on 0 Posts
Re: Send email when Remote Desktop starts

This is the best thing I can think of. Run gpedit.msc

Goto Computer Configuration --> Administrative Templates --> System --> Logon --> Run these programs at user logon

You can put your vbscript there everytime someone logon. It doesn't cover exactly how you want it but I assume if someone can RDP into successfully, the vbscript should run.
Old 02-02-11, 05:10 PM
  #6  
Senior Member
Thread Starter
 
Join Date: Mar 2003
Posts: 789
Likes: 0
Received 0 Likes on 0 Posts
Re: Send email when Remote Desktop starts

zuffy and palebluedot,

I already have this vbscript as the logon script, and it works perfect, IF the user actually logs on.

What often happens though is that a user does not logoff when finishing the RD. The next RD then does not trigger a logon (the user is already logged on) so the script never fires.

I am having trouble seeing if there is a specific event that fires when a RD connection gets initiated that I can attach to to run the script.

Thanks for the suggestions though! But, is what I am asking possible? How do I run the script when a RD connection gets initiated (not when a user logs on)?
Old 02-02-11, 06:16 PM
  #7  
DVD Talk Ultimate Edition
 
Join Date: Jan 2001
Location: Seattle
Posts: 4,454
Likes: 0
Received 0 Likes on 0 Posts
Re: Send email when Remote Desktop starts

There is nothing you can do about users that just close their session without logging off first other than changing the RDC session settings. For example you can set it to log off when disconnecting or idle, etc...You probably need a combination of these settings your logon script that emails you.

http://technet.microsoft.com/en-us/l.../cc754272.aspx

Well I just checked...you should always see a logon with a logon type of 3 when someone connects over the network, even if they don't logoff before disconnecting. Like I said, attach a task to that entry from the event viewer.

Last edited by palebluedot; 02-02-11 at 06:30 PM.
Old 02-05-11, 01:36 PM
  #8  
Senior Member
Thread Starter
 
Join Date: Mar 2003
Posts: 789
Likes: 0
Received 0 Likes on 0 Posts
Re: Send email when Remote Desktop starts

Originally Posted by palebluedot View Post
There is nothing you can do about users that just close their session without logging off first other than changing the RDC session settings. For example you can set it to log off when disconnecting or idle, etc...You probably need a combination of these settings your logon script that emails you.

http://technet.microsoft.com/en-us/l.../cc754272.aspx

Well I just checked...you should always see a logon with a logon type of 3 when someone connects over the network, even if they don't logoff before disconnecting. Like I said, attach a task to that entry from the event viewer.
BEAUTIFUL! This worked like a charm. For some reason, I had to do it for a logon type of 10, but heck, it works great! Thanks for this.

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service - Do Not Sell My Personal Information -

Copyright 2021 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.