Jump to content

reboot after GuiRunOnce


Recommended Posts

Hello all,

Just a little question :

In my unattend.txt I told windows to launch a script in the [GuiRunOnce] section to install some softwares...

(logged as local admin)

At the end of the script, I force the computer to reboot :

%systemdrive%\Tools\shutdown /L /R /C /T:5 /Y

Of course, I wait that all MY installation tasks in MY script are over before rebooting...

BUT :

It seems a lot of things occur on the first logon... (I don't have the list, it's sure the HDD is heating at this time !)

What if I reboot the computer at this time if these tasks are not completed ???

Anyone has any idea ?

Thanks !

Link to comment
Share on other sites


OK, I think I'll let a "comfortable" amount of time before rebooting so that win can complete its tasks...

It would be great if there was "trigger" (file, registry value ... ?) that is set after the process is complete...

Does anyone know about that ?

Thanks

Link to comment
Share on other sites

Put the command and switch "start /wait" (without the quotes) in front of all your GuiRunOnce commands.

This will help to alleviate all the simultaneous commands that are running. The /wait switch causes Windows to wait for that process to finish before moving on with the next command.

Obviously, if you wish to clean stuff up in a small time buffer that you set like Bi0haZarD does, then you don't want start /wait in front of the shutdown command, but everything else is fine.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...