user9176875
user9176875

Reputation:

how do i autostart batch file on windows startup

I would like my batch script to start automatically when my victim starts their computer. But it does not work when I put the file under "Start Menu". So how do I do?

Upvotes: 2

Views: 17118

Answers (1)

iBug
iBug

Reputation: 37217

Put the batch script (or a .lnk shortcut to it) under (for a specific user)

%AppData%\Microsoft\Windows\Start Menu\Programs\Startup

or (for all users, putting it here may require Admin privilege)

%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup

Or you can edit the registry to add an item or use Windows Task Scheduler. These two methods allow you to put your batch script anywhere.

FYI, I used to deploy my script1 by putting it somewhere and adding an entry (the type should be REG_SZ) under this registry key:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

(replace HKLM with HKCU to add an item for a specific user instead of all users)

1: Link goes to my GitHub repo

Upvotes: 5

Related Questions