Running a process at startup

I am trying to run a process at system startup.  I put an entry in the registry key

HKLM\Software\Microsoft\Windows\CurrentVersion\Run

If I login via the console and GUI, I can see the process running.  If I login via telnet, the process is not running.  It is not just hidden because, if I login via the GUI and have a concurrent session in telnet, I can see the application.

Does anyone have any insight as to why this would be?

Thanks,
Dan
crapshooterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LucasCommented:
Hello,

the processes in "Run" will not start when you log in via telnet, it's by design...

if you want to start a custom program after someone logs on to telnet server, here is the solution: https://technet.microsoft.com/en-us/library/cc787871%28v=ws.10%29.aspx

btw, telnet is not secure at all... you may want to use powershell remoting if you want to perform remote administration, etc...: In PowerShell: Enter-PSSession MyComputer
crapshooterAuthor Commented:
So, this was a change from XP to Win7?  I do have it working in an XP scenario.  Further, shouldn't anything in that key run as soon as the system starts regardless of anyone logging in?  That's the point of it being in HKLM instead of HKCU, right?
LucasCommented:
I don't know exactly how Windows XP handles theses keys but here is what Microsoft says:
Run keys cause programs to automatically run each time that a user logs on.
https://support.microsoft.com/en-us/kb/314866

or:
The Run key is processed after every logon, either by the Explorer shell, if it is present
https://msdn.microsoft.com/en-us/library/ms940034%28WinEmbedded.5%29.aspx

if you want, you can create a startup script by GPO: https://technet.microsoft.com/en-us/library/cc779329%28v=ws.10%29.aspx

or create a scheduled task that runs "At startup":
https://technet.microsoft.com/en-us/library/cc748841.aspx
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

crapshooterAuthor Commented:
I saw that.  However, I also saw the following:

From: https://technet.microsoft.com/en-us/magazine/ee851671.aspx

Run key (machine) Programs listed in the registry’s HKLM\Software\Microsoft\Windows\CurrentVersion\Run key are available at startup to all users.

Run key (user) Programs listed in the HKCU\Software\Microsoft\Windows\CurrentVersion\Run key run when the current user logs on. A similar subkey, HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Run, can also be used.

I may try some of the other methods you have mentioned as well but I am still a little miffed that Microsoft is not being consistent.
LucasCommented:
Yes, but it's subtle:
Run key (machine) Programs listed in the registry’s HKLM\Software\Microsoft\Windows\CurrentVersion\Run key are available at startup to all users.
=> Regardless which user logs on ==> processed after every logon, by the shell (explorer...)


Run key (user) Programs listed in the HKCU\Software\Microsoft\Windows\CurrentVersion\Run key run when the current user logs on
=> When this specific user logs on ==> processed after this user logon, by the shell

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
crapshooterAuthor Commented:
OK, I'm going to give some of the other options a shot and let you know.
LeeTutorretiredCommented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.