MSFN Forum: need to restart the windows after installed - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

need to restart the windows after installed Auto restart Rate Topic: -----

#1 User is offline   Romeo26222 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 09-March 05

Posted 08 May 2006 - 05:40 AM

Hi
i 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


#2 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 08 May 2006 - 06:10 AM

Type
Shutdown /?

in a DOS console window for usage. It will handle the restart for you within a cmd file.

#3 User is offline   Romeo26222 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 09-March 05

Posted 08 May 2006 - 06:19 AM

View PostMHz, on May 8 2006, 03:10 PM, said:

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??

#4 User is offline   Gouki 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,168
  • Joined: 19-March 05

Posted 08 May 2006 - 07:21 AM

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.

#5 User is offline   Romeo26222 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 09-March 05

Posted 08 May 2006 - 07:57 AM

thanx so much i will try to add this to GUIRUNONCE and will see...

#6 User is offline   T D 

  • Go MSFN!
  • PipPipPipPipPip
  • Group: Members
  • Posts: 940
  • Joined: 05-April 06

Posted 08 May 2006 - 12:03 PM

An easier way is to download something like poweroff
In your batch file, do something like

Quote

echo shutting down in (15?) seconds
sleep 15
poweroff poweroff

Once you install poweroff, find poweroff.exe in %windir%\system32 and put it in %xpcd%\$oem$\$$\System32

This post has been edited by T D: 08 May 2006 - 12:03 PM


#7 User is offline   Romeo26222 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 09-March 05

Posted 09 May 2006 - 01:20 AM

View PostGouki, on May 8 2006, 03:21 PM, said:

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???

#8 User is offline   Gouki 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,168
  • Joined: 19-March 05

Posted 09 May 2006 - 06:18 AM

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.

#9 User is offline   Romeo26222 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 09-March 05

Posted 09 May 2006 - 06:47 AM

View PostGouki, on May 9 2006, 02:18 PM, said:

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.

#10 User is offline   explorerdk 

  • Group: Members
  • Posts: 1
  • Joined: 09-May 06

Posted 09 May 2006 - 05:19 PM

It works fine for me, tested it with a set of login scripts :) worked charmingly :)

- Exp

#11 User is offline   muiz 

  • SPECIAL
  • PipPipPipPipPipPip
  • Group: Banned
  • Posts: 1,055
  • Joined: 03-August 03
  • OS:none specified
  • Country: Country Flag

Posted 10 May 2006 - 01:14 AM

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 @ /HID
shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."


#12 User is offline   Romeo26222 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 09-March 05

Posted 10 May 2006 - 02:32 AM

it works fine now it was my fault soru gouki for calling your method useless..iam sorry..

#13 User is offline   Gouki 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,168
  • Joined: 19-March 05

Posted 10 May 2006 - 07:02 AM

No problem buddy. I'm just happy it worked for you.

If you need anything else, just ask.

#14 User is offline   Guitaraholic 

  • Newbie
  • Group: Members
  • Posts: 14
  • Joined: 08-July 06

Posted 17 July 2006 - 07:53 AM

does this restart come into effect AFTER batch file installs?

#15 User is offline   tguy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 698
  • Joined: 19-May 04

Posted 17 July 2006 - 08:43 AM

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.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy