How to add a something to start up using batch?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
matthewxyz
Posts: 1
Joined: 22 Aug 2011 22:17
Contact:

How to add a something to start up using batch?

#1 Post by matthewxyz » 22 Aug 2011 22:25

I NEED A SCRIPT,not a tip for moving it to start up folder manually.

phillid
Posts: 109
Joined: 03 Apr 2010 20:27
Location: Wellington, New Zealand
Contact:

Re: How to add a something to start up using batch?

#2 Post by phillid » 23 Aug 2011 00:40

Okeydokey, here's a scirpt that will move the item "runthis.bat" into the current user's start>programs>startup folder:

Code: Select all

copy runthis.bat "%userprofile%\Start Menu\Programs\Startup\*.*"

(EDIT: Changed input filename)

Works fine on WinXP, not sure about Win7 or Vista


phillid

nitt
Posts: 218
Joined: 22 Apr 2011 02:43

Re: How to add a something to start up using batch?

#3 Post by nitt » 27 Aug 2011 10:27

phillid wrote:Okeydokey, here's a scirpt that will move the item "runthis.bat" into the current user's start>programs>startup folder:

Code: Select all

copy runthis.bat "%userprofile%\Start Menu\Programs\Startup\*.*"

(EDIT: Changed input filename)

Works fine on WinXP, not sure about Win7 or Vista


phillid


Ewww, statup folder? Not only does that folder take forever to actually start up, but it's limited to only that single folder.

Use my code:

Code: Select all

reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v file /t REG_SZ /d path


That will write the register and make the computer boot with the file "path". "file" is the name of the key, so you can change that to whatever the safe file name (safe file name is the name without the path) of your file, then change the "path" to the full file name. Such as:

Code: Select all

reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v notepad /t REG_SZ /d c:\windows\system32\notepad.exe


Not only does this literally boot right when you log in, but it also can boot from any path. Meaning you are not limited to just that single folder.

Post Reply