Fastest way to adding program in Windows startup [closed]
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:
- Right_Click to
SashaGoddess.exein Windows Explorer or desktop, - Select
Send to startup, - Shortcut for
SashaGoddess.exewill be created and send toshell:startup—C:\Users\SashaChernykh\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startupfor me.
3. Questions
- How to realize expected behavior?
or
- Other fast solutions? Built-in or gratis third-party applications.
4. Do not offer
- Please, do not offer solutions from that How-To Geek article or similar.
- Please, do not offer solutions with many steps for adding programs in startup.
2 Answers
Plan
- Write a script to create a shortcut (
.lnk) inshell:Startupfolder using supplied parameter as shortcut target; - Place that script (or its shortcut) into
shell:SendTofolder;
Usage
For sample SashaGoddess.exe application on two mouse clicks:
- Right_Click
SashaGoddess.exein 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"incmd,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%" 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\StartupTo 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\StartupFor 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.
5