127

On previous versions of Windows I have used the below technique to run a batch file on Windows startup.

  1. Create a shortcut to the batch file.
  2. Once the shortcut is created, right-click the shortcut file and select Cut.
  3. Click Start, then Programs or All Programs. Find the Startup folder and right-click that folder, then select Open.
  4. Once the Startup folder is opened, click Edit in the menu bar, then Paste to paste the shortcut file into the Startup folder. If you do not see the menu bar, press the Alt key to make the menu bar visible. Any shortcuts in the Startup folder will automatically run each time the user logs in to Windows.

I have been unsuccessful in finding how to do something similar on Windows 10.

Any ideas?

2
  • The link is dead - can you repost with a relevant one?
    – jlarks32
    Commented Jun 7, 2019 at 17:38
  • @jlarks32 I've updated as requested
    – baynezy
    Commented Jun 8, 2019 at 9:32

6 Answers 6

181

The startup folder is still there and functions as normal.

To access it, press Windows+R, then type shell:startup.

You should be able to do what you were previously doing in Windows 7 from there.

7
  • 41
    The problem with this shell:startup is that it's user dependent (when another user logs on to your computer, the program does not start up), in case you want to start up a program when your computer starts up, regardless of the user, you might add a shortcut in directory C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup.
    – Dominique
    Commented Apr 28, 2017 at 7:12
  • 8
    any way to run this as an administrator?
    – phil
    Commented Nov 3, 2017 at 0:13
  • 5
    @phil you should open a new question - but to answer your question: make a shortcut to your exe/bat file (right click > create shortcut to), then right-click on the shortcut > Properties > Advanced > Run as administrator.
    – glenneroo
    Commented Mar 26, 2019 at 23:41
  • I just tried this because after updating W10 (to version "20H2" from an old one, 1607) the script (Autohotkey) no longer ran. Putting it in this folder (C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) no longer seems to work. Commented Feb 19, 2021 at 18:51
  • 2
    @JerryGreen @phil you should use a Scheduled Task to run as an Administrator. You can set login as a trigger and configure the user context it will run as, tick Run with highest privileges.
    – Baa
    Commented Jul 11, 2022 at 11:15
52

You can use scheduled tasks and set it to run at startup.

Go to ManageScheduled TasksCreate a Basic Task.

Once at the dialog box, set a name, click Next and select at startup, Next again and select the program you want to run and next to finish. Done!

1
12

To add to user314352's answer:

The startup folder is still there and functions as normal.

To access it, press Windows+R, then type shell:startup.

You should be able to do what you were previously doing in Windows 7 from there.

You can also type shell:common startup to access the startup folder for all users.

9

If you don't have access to Windows+X functionality, you can navigate manually to the two startup folders:

  • User: C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
  • All users: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

Here's a useful batch file to open either or both of these folders:

rem Load the current user Start folder
%SystemRoot%\explorer.exe "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"

rem Load the "All Users" Start folder
%SystemRoot%\explorer.exe "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\StartUp"

Note: Above applies to Windows 8.1 and Windows 10 (and maybe earlier versions).

3
  • I just tried this because after updating W10 (to version "20H2" from an old one, 1607) the script (Autohotkey) no longer ran. Neither of these folders worked. Commented Feb 19, 2021 at 18:49
  • You mean neither of these folders are available? Where does shell:startup and shell:common startup take you?
    – AlainD
    Commented Feb 19, 2021 at 21:38
  • No, they're there all right. Just found that only the "common startup" location works, and that's after reinstalling Autohotkey (as admin). See my question and answer here: superuser.com/q/1627437/419196 Commented Feb 20, 2021 at 8:54
4

I have an MSI motherboard that is not playing nice with my beloved Gateway Anykey keyboard. Num Lock won't turn off at boot.

I added a "NumLock Off" utility to the shell:startup folder. No help. I added it to Scheduled Tasks and that worked. BTW, I couldn't schedule a shortcut to the utility. I could only schedule a batch file with the numlock.exe file and the "off" parameter on the command line.

1
2

Alternative through Group Policy

gpedit: Local Computer Policy > Computer Configuration > Windows Settings > Script (Startup/Shutdown)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .