Romeo26222 Posted May 8, 2006 Share Posted May 8, 2006 Hii have made my unattended winxp cd and everything works fine but i want any tip to make the windows restart after installation so after this restart the runonce will be excuted...i mean i don't want from the user to do this i want it to restart once and then this command not excuted again..any batch file or cmd for this???thanx Link to comment Share on other sites More sharing options...
MHz Posted May 8, 2006 Share Posted May 8, 2006 Type Shutdown /?in a DOS console window for usage. It will handle the restart for you within a cmd file. Link to comment Share on other sites More sharing options...
Romeo26222 Posted May 8, 2006 Author Share Posted May 8, 2006 Type Shutdown /?in a DOS console window for usage. It will handle the restart for you within a cmd file.ok now any tips on how to add this command to windows first startup and after being restarted using this patch i add a command to delete this file to stop restarting the pc again and again?? Link to comment Share on other sites More sharing options...
Gouki Posted May 8, 2006 Share Posted May 8, 2006 shutdown.exe -r -f -t 30 -c "Please hold, Windows will restart"This will start a pop-up window with a custom message and 30 second timer.Lauching this batch file from [GuiRunOnce] will not restart the computer more than once, because the answer file is only used to install the OS and to launch files ONCE after installation. Link to comment Share on other sites More sharing options...
Romeo26222 Posted May 8, 2006 Author Share Posted May 8, 2006 thanx so much i will try to add this to GUIRUNONCE and will see... Link to comment Share on other sites More sharing options...
T D Posted May 8, 2006 Share Posted May 8, 2006 (edited) An easier way is to download something like poweroffIn your batch file, do something likeecho shutting down in (15?) secondssleep 15poweroff poweroffOnce you install poweroff, find poweroff.exe in %windir%\system32 and put it in %xpcd%\$oem$\$$\System32 Edited May 8, 2006 by T D Link to comment Share on other sites More sharing options...
Romeo26222 Posted May 9, 2006 Author Share Posted May 9, 2006 shutdown.exe -r -f -t 30 -c "Please hold, Windows will restart"This will start a pop-up window with a custom message and 30 second timer.Lauching this batch file from [GuiRunOnce] will not restart the computer more than once, because the answer file is only used to install the OS and to launch files ONCE after installation.it didn't work..i tried it but nothing happens..as i know runonceex is loaded at t-12 so this command is useless in this case..any other help??? Link to comment Share on other sites More sharing options...
Gouki Posted May 9, 2006 Share Posted May 9, 2006 What!? Have you created a batch file with the code I gave you and then 'called' that same file from your answer file?Don't say something is useless without being sure. I have, as well as many others, been using it for quite some time. Link to comment Share on other sites More sharing options...
Romeo26222 Posted May 9, 2006 Author Share Posted May 9, 2006 What!? Have you created a batch file with the code I gave you and then 'called' that same file from your answer file?Don't say something is useless without being sure. I have, as well as many others, been using it for quite some time.I am sure it didn't work with me but i will try again today from the 1st step to see if i made anything wrong. Link to comment Share on other sites More sharing options...
explorerdk Posted May 9, 2006 Share Posted May 9, 2006 It works fine for me, tested it with a set of login scripts worked charmingly - Exp Link to comment Share on other sites More sharing options...
muiz Posted May 10, 2006 Share Posted May 10, 2006 GuiRunOnce :ECHO.ECHO Restarting the PC in 1 minute...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute"Runonce :cmdow @ /HIDshutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..." Link to comment Share on other sites More sharing options...
Romeo26222 Posted May 10, 2006 Author Share Posted May 10, 2006 it works fine now it was my fault soru gouki for calling your method useless..iam sorry.. Link to comment Share on other sites More sharing options...
Gouki Posted May 10, 2006 Share Posted May 10, 2006 No problem buddy. I'm just happy it worked for you.If you need anything else, just ask. Link to comment Share on other sites More sharing options...
Guitaraholic Posted July 17, 2006 Share Posted July 17, 2006 does this restart come into effect AFTER batch file installs? Link to comment Share on other sites More sharing options...
tguy Posted July 17, 2006 Share Posted July 17, 2006 You could also enable AutoAdminLogon. It will reboot the computer when the OS is finished installing, logon, launch RunOnceEx then you can reboot after your applications are installed and Windows will come up ready for the user to login to and start using.If you get stuck, send me a PM and I'll try and help out. If you've already fixed the problem. Congrats, and no need to bother with the above. Just another way to do it. Link to comment Share on other sites More sharing options...
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