For my work, I want a bat-file to run when Windows starts up. This starts up a local database server with my test database I use for all my development.
Startup folder
To do this, launch Explorer and go to %AppData%\Microsoft\Windows\Start Menu\Programs\Startup. Paste a shortcut to the file you want to run in this folder.
Run a command
Alternatively, you can run a command via Windows' Task Scheduler. Create a new task and set it for Windows 8 or 10. Add a trigger and set it to at log in. Add an action and enter the command including any arguments.
It worked with 'at login'. 'at startup' strangely seems to run the command when signing out or shutting down. At least, that's what I saw in the tasks history.
ReplyDelete