# Start on Windows Startup

## Recommended Posts

Hey guys! I have a really simple question - do you happen to know how the pc can start a program or a file as soon as the computers starts without me being there? I want to try controlling ot from my other house and I want the script that connects to my other computer to be started as soon as Windows starts up.

Thanks

##### Share on other sites

Hey guys! I have a really simple question - do you happen to know how the pc can start a program or a file as soon as the computers starts without me being there? I want to try controlling ot from my other house and I want the script that connects to my other computer to be started as soon as Windows starts up.

Thanks

If there's only one user on the PC (and therefore as soon as the computer starts, it logs onto their profile), you could just put a link (or your script itself) in %userprofile%\start menu\startup

Otherwise, you'll have to run your script as a service (see the FAQs pinned at the top of this forum).

"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110

##### Share on other sites

If there's only one user on the PC (and therefore as soon as the computer starts, it logs onto their profile), you could just put a link (or your script itself) in %userprofile%\start menu\startup

Otherwise, you'll have to run your script as a service (see the FAQs pinned at the top of this forum).

Thanks but I don't really know how to do that . Can I get a little more information please?

##### Share on other sites

im not 100% but i think he means that you can put the scrupt in the start menu under:

Start -> program -> autostart

everything that is put in there is run everytime the user logs in so just drag and drop the script there and i think it should work

or did you mean how to run it as a service?

##### Share on other sites

You could also create a scheduled task to run at startup.

Start -> Run

Edited by spudw2k

Spoiler

Misc Code Snippets:
Projects: SubnetCalc
Cool Stuff:

##### Share on other sites

You can simply add this code:

RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run', 'namedoenstmatter', 'REG_SZ', @ScriptFullPath)

##### Share on other sites

or you can add it to windows service!!

##### Share on other sites

You can do something like this

$Name = "programname.exe" FileCopy(@ScriptFullPath, @StartupDir & "/" &$name, 1)

(Maybe it isnt right but i think it is good

code

##### Share on other sites

I would do it this way Nooblet. Add a shortcut to the @StartupDir.

$Name = "path\to\programname.exe" FileCreateShortcut($Name, @StartupDir & '\programname.lnk')

## Create an account

Register a new account