|
Answer» Hi,
I wanted to be able to move and then EXECUTE on startup or LOGIN.
Code: [Select]MOVE "C:\Documents and Settings\USER\Desktop\thing.bat" "C:\Documents and Settings\USER\Start Menu\Programs\startup" START notepad.exe
This doesn't work though im guessing as It wont be able to find the file for the MOVE command it won't work. Anyway to make this work? Or do I have to have TWO seperate batchfiles?Just a guess, but shouldn't the START NOTEPAD.EXE command be in the THING.BAT
:-?The code looks OK to me (if you wanted to run the batch file manually). Is the thing that doesn't work the part about getting it to work on startup? How are you trying to get it to run at startup or login?Hi,
I wanted to when u ran thing.bat (the code I posted) It MOVES itself to the startup folder. Then when you start the computer it will start notepad.So you want a batch file that will create something in the Startup folder to start notepad? If so, try this: Code: [Select]echo start notepad.exe >"%HOMEDRIVE%%HOMEPATH%\Start Menu\Programs\Startup\StartNotepad.bat"It worked So the command says to write start notepad.exe to a file in the startup folder and as the isn't one it creates one right? Also if you put it on different lines like:
Code: [Select]echo start notepad.exe >"C:\Documents and Settings\All Users\Start Menu\Programs\Startup\StartNotepad.bat" it doesn't work, why?That seems like it should work ... just make sure the command is all on the same line. If it is still not working, look in the directory "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" and make sure the file got created.
|