Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to schedule a bat/exe file to auto run when Win XP SP2 /SP3 reboot

Featured Replies

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 ?

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 2

Type AT /? at a command prompt for scheduling

  • Author

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.

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.

  • Author

Yes. That will do the job.

Thanks, -X-! :)

PS. Oops. Don't need the 'c' program at all!

Edited by ravisunny2

  • Author

I tried the following:

SET KEY=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
REG ADD %KEY% /V MY_CMD /D "E:\Second.cmd" /f
pause
shutdown.exe -r -f -t 10 -c "Windows XP will now restart in 10 seconds"

and

SET KEY=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
REG ADD %KEY% /V MY_CMD /D "E:\Third.cmd" /f
pause
shutdown.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 by ravisunny2

HKLM will run a tad earlier than HKCU.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.