Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Created August 29, 2018 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/837f85839fe320ad7d5694f3708551d1 to your computer and use it in GitHub Desktop.
Save jpluimers/837f85839fe320ad7d5694f3708551d1 to your computer and use it in GitHub Desktop.
Windows: running a batch file during logon of a single or all users
:: https://stackoverflow.com/questions/16087694/auto-run-a-bat-script-in-windows-7-at-login
:: https://superuser.com/questions/15596/automatically-run-a-script-when-i-log-on-to-windows
call :do "%AllUsersProfile%/Start Menu\Programs\Startup"
goto :eof
:do
mkdir %*
pushd %*
explorer /e,.
:: https://stackoverflow.com/questions/16087694/auto-run-a-bat-script-in-windows-7-at-login
call :do "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup"
goto :eof
:do
mkdir %*
pushd %*
explorer /e,.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment