Tech Support > Microsoft Windows > Customizing > Adjusting start menu startup
Adjusting start menu startup
Posted by Hank Nussbacher on April 9th, 2008


I am trying to manipulate the startup menu to execute a program. I have a
..bat file in:
C:\Documents and Settings\All Users\Start Menu\Programs\Startup
that reads:
---------------------
@echo on
rem copy the shared folder to startup (assumed it is mounted on Z)
xcopy /s /z /i "z:\adit\*.*" "C:\Documents and Settings\All Users\Start
Menu\Programs\Startup"
exit
----------------------
The purpose is to to take a program (or programs) that appears on an
externally mounted disk and copy them to the startup menu so that when XP
starts up, these programs will also get executed (the program(s) names
change at every startup).

The bat file copies the .exes to the startup directory but XP doesn't
execute them. How can I get XP to execute these programs automatically upon
startup (can be at the end of the entire startup sequence)? Is there some
registry setting that needs to be changed? Is there some alternate "trick"
I can use to pull this off?

Thanks,
Hank



Posted by ju.c on April 9th, 2008


I've been watching your post since I am curious about this. I'm not an
expert, but I have an idea.

You want to:

1. Windows Starts
2. Batch file is launched from Startup folder
3. Files are copied to a folder
4. Copied files are launched

Right?

Your batch commands now just copy from disk to Start Menu\Startup. Why
copy to Startup and not a temp folder?

Couldn't you output the files that are copied to another batch file and
run it?

xcopy /s /z /i "z:\adit\*.*" C:\TEMP
xcopy /n "z:\adit\*.*" >C:\TEMP\Launch.bat
call C:\TEMP\Launch.bat

Something like that?


ju.c


"Hank Nussbacher" <hnussbacher@gmail.com> wrote in message
news:OwlgzmgmIHA.5684@TK2MSFTNGP03.phx.gbl...

Posted by Hank Nussbacher on April 10th, 2008


I'll give it a try next week.

Thanks for the idea,
Hank

"ju.c" <bibidybubidyboop@mailnator.com> wrote in message
news:uAnETghmIHA.4196@TK2MSFTNGP04.phx.gbl...


Posted by ju.c on April 10th, 2008


I think it needs tweaking, good luck!

PS: Do you want to see the command window, or have it run hidden?


ju.c


"Hank Nussbacher" <hnussbacher@gmail.com> wrote in message
news:O1wc8AtmIHA.980@TK2MSFTNGP06.phx.gbl...

Posted by ju.c on April 10th, 2008


This line:

xcopy /n "z:\adit\*.*" >C:\TEMP\Launch.bat

should be changed to this

xcopy /n "z:\adit\*.exe" >C:\TEMP\Launch.bat

no?

ju.c


"ju.c" <bibidybubidyboop@mailnator.com> wrote in message
news:%23qsL3SumIHA.4684@TK2MSFTNGP06.phx.gbl...

Posted by Hank Nussbacher on April 17th, 2008


I did something different based on your idea:

xcopy /s /z /i "z:\adit\*.*" C:\TEMP
dir /b "z:adit\*.*">C:\temp\launch.bat
call c:\temp\launch.bat
erase /q c:\temp\*.*

This way launch.bat has a list of files so not only .exe can run.

Thannks,
Hank


"ju.c" <bibidybubidyboop@mailnator.com> wrote in message
news:uEn$$fumIHA.3884@TK2MSFTNGP05.phx.gbl...


Posted by ju.c on April 17th, 2008


It works now?

Is the second line a typo:

dir /b "z:adit\*.*">C:\temp\launch.bat

z:adit\

z:\adit\


I have tips to launch command windows hidden, if you want.


ju.c


"Hank Nussbacher" <hnussbacher@gmail.com> wrote in message
news:e6tpxaEoIHA.3556@TK2MSFTNGP04.phx.gbl...

Posted by Hank Nussbacher on April 21st, 2008


It works fine now.

Thanks,
Hank

"ju.c" <bibidybubidyboop@mailnator.com> wrote in message
news:OaPJkpEoIHA.4308@TK2MSFTNGP06.phx.gbl...



Similar Posts