Fastest way to adding program in Windows startup

5,216

Solution 1

Plan

  1. Write a script to create a shortcut (.lnk) in shell:Startup folder using supplied parameter as shortcut target;
  2. Place that script (or its shortcut) into shell:SendTo folder;

Usage

For sample SashaGoddess.exe application on two mouse clicks:

  • Right_Click SashaGoddess.exe in Windows Explorer or desktop,
  • navigate to Send to… submenu (which should expand automatically),
  • Click your script…

Hint

FYI, shell:Startup folder name equivalent in native Windows scripts is

  • "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup" in cmd,
  • WScript.CreateObject("WScript.Shell").SpecialFolders("Startup") in VBScript,
  • [Environment]::GetFolderPath('Startup') in Powershell.

Sample .bat script (basic functionality):

@ECHO OFF
SETLOCAL EnableExtensions DisableDelayedExpansion

if "%~1"=="" goto :eof
if not exist "%~1"  goto :eof

set "_auxiliaryScript=%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
set "_lnkFile=%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\%~n1.lnk"

> "%_auxiliaryScript%" (
  echo Set oLnk = WScript.CreateObject^("WScript.Shell"^).CreateShortcut^("%_lnkFile%"^)
  echo oLnk.TargetPath = "%~1"
  echo oLnk.Save
)
cscript //nologo "%_auxiliaryScript%"
del "%_auxiliaryScript%"

Solution 2

If you need to copy the program/shortcut to a specific user's Startup folder, the target would be as follows:

%SystemDrive%\Users\(User-Name)\AppData\Roaming\Microsoft\​Windows\Start Menu\Programs\Startup

To quickly access your another user's Startup folder, it may seem a bit remedial but I normally keep that same path name saved in a text file and paste it into File Explorer whenever I need it. As a result, if I want to copy a shortcut to a few specific users I can simply change the User field in the File Explorer address bar and quickly navigate to another person's Startup folder.

On the other hand, if you need to place that same program/shortcut into the Startup folder for all users on that computer, the appropriate location would be as follows:

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

For future usage, if you want quick access to the Startup folder that applies to all users, you could use that same path to create a shortcut to that folder and have it readily available on your desktop, your Quick Access in File Explorer, etc.

Share:
5,216

Related videos on Youtube

Саша Черных
Author by

Саша Черных

Не являюсь Девушкой, но взял в честь Девушки, Которую Люблю, своё имя. Спрашиваю, только если не нахожу ответа с помощью поисковиков. Стараюсь искать тщательно. Не судите строго. Пожалуйста, если выставляете мне минусы, комментируйте их.

Updated on September 18, 2022

Comments

  • Саша Черных
    Саша Черных over 1 year

    1. Description

    In Google I can find only solutions, where I need in many steps for adding my program to Windows 10 startup folder. Are there fast ways? Example:


    2. Expected behavior

    For example, I have SashaGoddess.exe application:

    1. Right_Click to SashaGoddess.exe in Windows Explorer or desktop,
    2. Select Send to startup,
    3. Shortcut for SashaGoddess.exe will be created and send to shell:startupC:\Users\SashaChernykh\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup for me.

    3. Questions

    • How to realize expected behavior?

    or

    • Other fast solutions? Built-in or gratis third-party applications.

    4. Do not offer

    1. Please, do not offer solutions from that How-To Geek article or similar.
    2. Please, do not offer solutions with many steps for adding programs in startup.
    • Run5k
      Run5k over 7 years
      Are you looking to add the programs/shortcuts to specific individual startup folders, or everyone's startup folder? For a specific user, the target would be %SystemDrive%\Users\(User-Name)\AppData\Roaming\Microsoft\Wi‌​ndows\Start Menu\Programs\Startup. To do the same thing for all users, the appropriate folder would be %SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup.
    • Саша Черных
      Саша Черных over 7 years
      @Run5k, does not matter for me, both solutions are suitable for me. But maybe for other users suitable only one of the solutions. So I think it's better publish both, if you can realize it. Thanks.
  • Саша Черных
    Саша Черных over 7 years
    Run5k, yes, I know it. But what I can do for quickly add applications to one of these folders? Thanks.
  • Run5k
    Run5k over 7 years
    For the folder that applies to all users, there are potentially a few different methods. Essentially, you could create a shortcut to that folder and have it readily available on your desktop, your Quick Access in File Explorer, etc. For a specific user, I normally keep that same path name in a text file and paste it into File Explorer. As a result, if I need to copy a shortcut to a few specific users, I can simply change the User field in the File Explorer address bar and quickly navigate to another person's Startup folder.
  • LPChip
    LPChip over 7 years
    -1 from me. The user clearly asks for a method. They want to learn HOW to do it quick, not where the paths are. The quickest way to go to one's startup folder is typing shell:startup in the address bar anyway.
  • Run5k
    Run5k over 7 years
    @LPChip , good feedback and I am glad to expand my answer. Regarding your second point, I would tend to agree… however, the OP emphasized to "Please, do not offer solutions from that How-To Geek article", and the shell:startup method was specifically mentioned within that article. Since he went out of his way to stress that point, I wanted to respect his wishes.
  • Саша Черных
    Саша Черных over 7 years
    Run5k, I don't think that your solution it allows users to spend less time for add programs in startup than solution on How-To Geek. Thanks.
  • Саша Черных
    Саша Черных over 7 years
    JozefZ, this script helped for me. Please, add script example in your answer, and I accept it. Thanks.