Adjusting start menu startup

  • Thread starter Hank Nussbacher
  • Start date
H

Hank Nussbacher

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
 
J

ju.c

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
 
J

ju.c

I think it needs tweaking, good luck!

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


ju.c
 
J

ju.c

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
 
H

Hank Nussbacher

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
 
J

ju.c

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
 
H

Hank Nussbacher

It works fine now.

Thanks,
Hank

ju.c said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top