Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any way to autorun an exe when windows boots up, but before user logs in? One of the options is register a windows service, however sometimes this is not possible. I'm looking for sth like a registry key (HKCU\Software\Windows\CurrentVersion\Run).

share|improve this question

migrated from stackoverflow.com Feb 6 '10 at 3:57

This question came from our site for professional and enthusiast programmers.

1  
As the most obvious use for this capability is to enable malware, it might help if you could explain your application in a little more detail. –  John R. Strohm Feb 5 '10 at 15:33
    
HKLM instead of HKCU (assuming you have the rights to amend this key) –  AdamV May 20 '10 at 21:52
add comment

3 Answers 3

You can actually turn pretty much any program to a Windows Service. See NSSM - the Non-Sucking Service Manager.

share|improve this answer
    
Sorry, I can, however I cannot register windows service for various reasons. –  aloneguid Feb 4 '10 at 12:13
add comment

Scheduled Tasks allows you to create a task that runs when the computer starts.

You can either follow the instructions in the Microsoft KB to create a scheduled task through the GUI, or you can run a command similar to this:

schtasks /create /tn MyTask /tr C:\MyApp\MyApp.exe /sc ONSTART /ru username /rp *
share|improve this answer
add comment

Just make a batch file to run the program and insert it into the standard startup scripts:

  • Navigate to Start -> Run and type gpedit.msc then press Enter
  • Under Computer Configuration -> Windows Settings open Scripts(Startup/Shutdown)
  • Double-click "Startup" in right pane.
  • Click Add and browse to your script and then click OK
share|improve this answer
    
How is this offensive? –  Ivo Flipse Jun 17 '10 at 7:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.