ravisunny2 Posted September 7, 2010 Posted September 7, 2010 Hi,I haven’t been regular, and one post of mine was apparently deleted by some mod.I went and read the sticky, and sure enough, it states that prolonged absence from the forum can result in a post being deleted.Well, I’m trying to post again. Hope this one doesn’t get deleted.Is there any way to write a cmd file to schedule a bat/exe file to auto run when Win XP SP2 /SP3 reboots ?
Guest Posted September 7, 2010 Posted September 7, 2010 I'm not so sure on what you are asking. You need the cmd file to do the scheduling or you just need a cmd file to run when the computer reboots?Just stick it in Start Menu > Programs > Startup if option 2Type AT /? at a command prompt for scheduling
ravisunny2 Posted September 7, 2010 Author Posted September 7, 2010 Thanks, -X-,I am trying to make un unattended XP cd, without using nlite for the updates.I want to apply the updates via cmd files, in multiple phases.I need these cmd files to run in proper sequence, after each reboot.I want to invoke a 'c' program when the pc has booted up. This program, will in turn start the appropriate cmd file.I know this sound weird, but I want my unattended XP cd to remain simply a basic unattended cd.I don't want to incorporate the updates via nlite.
Guest Posted September 7, 2010 Posted September 7, 2010 I don't know what you mean by "invoke a 'c' program"What I would do is use HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce to launch the cmd file. Then have the last line in the cmd file add a new runonce entry for the next cmd file, etc.
ravisunny2 Posted September 7, 2010 Author Posted September 7, 2010 (edited) Yes. That will do the job.Thanks, -X-! PS. Oops. Don't need the 'c' program at all! Edited September 7, 2010 by ravisunny2
ravisunny2 Posted September 12, 2010 Author Posted September 12, 2010 (edited) I tried the following:SET KEY=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY% /V MY_CMD /D "E:\Second.cmd" /fpauseshutdown.exe -r -f -t 10 -c "Windows XP will now restart in 10 seconds"and SET KEY=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY% /V MY_CMD /D "E:\Third.cmd" /fpauseshutdown.exe -r -f -t 10 -c "Windows XP will now restart in 10 seconds"It worked. The first cmd file set the Second.cmd to run at startup, and it did.The Second.cmd file set the Third.cmd to run at startup, and it did.I have a couple of doubts.1) The cmd file specified to run at startup, ran before all the applications had loaded.2) If I remember right, after installing .net, the login window changes, and the machine does not login automatically. I had to use tweakui to enable the auto logon.Should I use HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce instead of HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce ? Edited September 12, 2010 by ravisunny2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now