Hi All
Anyone know what runonce.exe is, and why it might be in my windows startup list (MSconfig, startup tab)? I dont remember seeing it there before. Searched this forum, gen win solutions and MSkb without any luck.
Thanks, Dave
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Windows » Windows Vista, XP and earlier » Questions: Vista, XP back to 3.1 » runonce.exe (98SE)
Hi Dave
I didn’t have a restart waiting that I was aware of, but did one anyway to check. It didn’t remove runonce.exe from the list. If it’s any help, on the left side of the list on the msconfig startup tab it says mdac_runonce and on the right references the .exe in the windowssystem folder. I like to keep my startup as thin as possible, so I’m wondering if I can uncheck it. I was also wondering what it was doing there.
Thanks for any help
Dave
From reading what you posted, it sounds like at some point you upgraded your MDAC (Microsoft Data Access Components). This can happen as part of other software installs too, notably Internet Explorer.
Clear the checkbox and reboot. I’d lay a twenty that you will never miss it. RunOnce.exe is intended to complete setups after a reboot – ever see that cute little gray box that says “Windows is now setting up the following items”? There ya have it.
I found this on the MSoft Knowledge Base and made it into a batch file.
My needs are simple. First thing each morning I slide my backup drive into the rails, and power on. My boot sequence detects the extra drive (If Exist …) and initiates a backup from my main drive to the backup drive. After which I shut down the machine.
I decided that the machine ought to shut itself off, so that a blank screen or quietness tells me that the backup is complete, at which point I can extract the backup drive and re-power the machine.
You will note that I first essayed with the runonce.exe. If I were using it regularly, I’d turn the BATch file into a shortcut and cause it to close automatically.
REM ShutDown.bat Christopher Greaves Thursday, November 15, 2001
::
::
:: You can use either of the following commands in a batch file to restart
:: Windows 98/Me automatically:
::
:: runonce.exe -q
::
:: rundll32.exe shell32.dll,SHExitWindowsEx n
::
:: where n is one, or a combination of, the following numbers:
::
:: 0 – LOGOFF
::
:: 1 – SHUTDOWN
::
:: 2 – REBOOT
::
:: 4 – FORCE
::
:: 8 – POWEROFF
::
:: The above options can be combined into one value to achieve different
:: results. For example, to restart Windows forcefully, without querying any
:: running programs, use the following command line:
::
:: rundll32.exe shell32.dll,SHExitWindowsEx 6
::
:: NOTE: Using the FORCE option can cause programs to lose data.
::
:: Below is an explanation of each available option used with the above
:: command line:
::
:: LOGOFF – Shuts down all running processes, then logs the user off.
::
:: POWEROFF – Shuts down the system and turns off the power. The system must
:: support the power-off feature.
::
:: REBOOT – Shuts down the system and then restarts the system.
::
:: SHUTDOWN – Shuts down the system to a point at which it is safe to turn off
:: the power. All file buffers have been flushed to disk, and all running
:: processes have stopped.
::
:: FORCE – Forces processes to terminate. When this flag is set, Windows does
:: not query running applications to inform them that Windows is shutting
:: down. This can cause the applications to lose data, therefore, you should
:: only use this flag in an emergency.
::
:: The “rundll32.exe shell32.dll,SHExitWindowsEx (n)” command mentioned above
:: can be called from the RunOnce registry key.
::
:: The runonce.exe -q command mentioned above restarts the computer after a 15
:: second delay. There are no other options when using this command line, and
:: it cannot be called from the RunOnce registry key.
::
:: For additional information about the RunOnce registry key, please see the
:: following article in the Microsoft Knowledge Base: Q137367 Definition of
:: the RunOnce Keys in the Registry Article ID: Q234216
::
:: c:windowssystemrunonce.exe -q
c:windowsrundll32.exe shell32.dll,SHExitWindowsEx 13
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications