views:

36

answers:

1

Is there any difference in behavior of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key, when an user Logs in via console and/or does a RDP to the Machine.

I have a exe listed in Run key to be launched when somebody logs in. If I log in to a Win 2003 machine via console the exe is launched, keeping this session open if I do an RDP I get another session but this time the exe is not launched.

A: 

I've just verified (on a Windows Server 2003 machine) that a process will run for every remote desktop session opened by adding a key that points to c:\windows\system32\cmd.exe. I should mention that the Win2k3 machine I used is domain joined, I logged in using my domain credentials and left the first session open whilst logging into the second session. I can now see both RDP sessions on my screen with a command prompt open in each of them.

With that in mind, does the exe you're attempting to run check for itself in memory / use a "guard file" to ensure that only one copy is active at any one time?

Rob
Great! seems like you answer my question, I am creating a mutex based on user name to allow only one instance, that the reason. It just didn't click me.Thanks a lot !!
Prashant