0

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.

2 Answers2

2

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%"
JosefZ
  • 13,855
1

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.

Run5k
  • 16,463
  • 24
  • 53
  • 67