Autostart program when windows boots (no user session)

2

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).

Ivan G.

Posted 2010-02-04T11:59:32.343

Reputation: 120

1As 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. – None – 2010-02-05T15:33:43.627

HKLM instead of HKCU (assuming you have the rights to amend this key) – AdamV – 2010-05-20T21:52:57.873

Answers

2

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

Anton Gogolev

Posted 2010-02-04T11:59:32.343

Reputation: 193

Sorry, I can, however I cannot register windows service for various reasons. – None – 2010-02-04T12:13:26.960

2

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 *

Stephen Jennings

Posted 2010-02-04T11:59:32.343

Reputation: 21 788

-1

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

John T

Posted 2010-02-04T11:59:32.343

Reputation: 149 037

How is this offensive? – Ivo Flipse – 2010-06-17T07:05:14.037