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.

Shutdown After RunOnceEx

Featured Replies

I want to time a shutdown to occur 60 seconds after RunOnceEx finishes on XP Professional SP3, but I don't want the annoying, ugly timer box, or any batch windows to appear at all. How can I accomplish this?


Good question, its such an ugly box :wacko: why did they have to make it look like your system has just failed !?

You could use a VBS script as the last entry in your RuOnceEx that will hide the dialog

Save as ShutDown.vbs

WScript.Sleep 60000
CreateObject("Wscript.Shell").Run("shutdown.exe -r -f"),0,True

REG ADD %KEY%\999 /VE /D "Shut Down Computer" /f
REG ADD %KEY%\999 /V 1 /D "%Install%\Shutdown\ShutDown.vbs" /f

  • Author
Thank you, I will give it a go now ...

Me too! :thumbup

I can't get this to work, I have done everything you said but it still gives me the shutdown screen with 30 seconds to reboot :realmad: I did delete the old reboot info from my cleanup.cmd ?? 3 times I have tried now with the same result, I'm sure it worked the 1st time I tried it :crazy:

Here try this new code I have tested this and it works

Save As Shutdown.vbs

 WScript.Sleep 60000
Dim Col, Obj, Wmi
Set Wmi = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\.\root\cimv2")
Set Obj = Wmi.ExecQuery("Select * from Win32_OperatingSystem")
For Each Col in Obj
Col.Shutdown(2)
Next

Thanks gunsmokingman, but that didn't work either :huh: just shut it down and didn't restart :wacko: I just put this "shutdown.exe -r -f -t 00" into a program called "Quick Batch File Compiler" and it worked perfect .. I also put that same command into a .bat file but I prefer using the .exe QBFC made as it seems to happen alot faster ..

  • Author
why not use psShutdown frm SysinernalsSuite ?

psshutdown.exe -f -r -t <time> -v 0

Thanks, it hid the countdown, but you did forget to list a very important switch, /accepteula. Without it, an unattended install gets stopped dead. :wacko:

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.