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
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
>I am trying to manipulate the startup menu to execute a program. I
>have a
[quoted text clipped - 26 lines]
> Thanks,
> Hank
Hank Nussbacher - 10 Apr 2008 06:57 GMT
I'll give it a try next week.
Thanks for the idea,
Hank
> I've been watching your post since I am curious about this. I'm not an
> expert, but I have an idea.
[quoted text clipped - 52 lines]
> > Thanks,
> > Hank
ju.c - 10 Apr 2008 09:27 GMT
I think it needs tweaking, good luck!
PS: Do you want to see the command window, or have it run hidden?
ju.c
> I'll give it a try next week.
>
[quoted text clipped - 65 lines]
>> > Thanks,
>> > Hank
ju.c - 10 Apr 2008 09:50 GMT
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
>I think it needs tweaking, good luck!
>
[quoted text clipped - 72 lines]
>>> > Thanks,
>>> > Hank
Hank Nussbacher - 17 Apr 2008 05:48 GMT
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
> This line:
>
[quoted text clipped - 84 lines]
> >>> > Thanks,
> >>> > Hank
ju.c - 17 Apr 2008 06:17 GMT
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
>I did something different based on your idea:
>
[quoted text clipped - 104 lines]
>> >>> > Thanks,
>> >>> > Hank
Hank Nussbacher - 21 Apr 2008 08:21 GMT
It works fine now.
Thanks,
Hank
> It works now?
>
[quoted text clipped - 118 lines]
> >> >>> > Thanks,
> >> >>> > Hank