MSFN Forum: Restarting after adding RunOnceEx entries - MSFN Forum

Jump to content



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

Restarting after adding RunOnceEx entries Rate Topic: -----

#1 User is offline   cartman02au 

  • Newbie
  • Group: Members
  • Posts: 18
  • Joined: 05-November 04

Posted 07 February 2005 - 09:36 PM

Hi all,
I am currently using [GuiRunOnce] in WINNT.SIF to place entries into the RunOnceEx part of the registry, add a new user and then reboot (so that RunOnceEx kicks in).

The problem I am having is that my restart command (using a batch script, as for some reason I cant call sahutdown -r -t 0 from GuiRunOnce) isn't executed. Windows starts, then on the next startup the RunOnceEx entries are ran.

The other issue I have is that I cant get the autologin to persist. It works once, then asks for a username and password every login after that.

Here are the relevant sections:
WINNT.SIF
[GuiRunOnce]
%systemdrive%\install\install.cmd
%systemdrive%\install\adduser.cmd
%systemdrive%\install\restart.cmd


Restart.cmd
shutdown -r -t 0


adduser.cmd
net user Owner /add
net localgroup Administrators Owner /add
net accounts /maxpwage:unlimited
REGEDIT /S %systemdrive%\install\autologon.reg
EXIT


autoloon.reg
Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Owner"
"AltDefaultUserName"="Owner"

"AutoAdminLogon"="1"


Thanks in advance,
C02.


#2 User is offline   valter 

  • Professor
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 15-June 04

Posted 08 February 2005 - 01:11 AM

hi,

as per restart try to modify this to fit your needs

shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."


as per autologon, try to set password on the user while adding the user from adduser.cmd. Don't forget to add password to your autologon.reg

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="John"
"DefaultPassword"="asdf1234"
"AutoAdminLogon"="1"


#3 User is offline   cartman02au 

  • Newbie
  • Group: Members
  • Posts: 18
  • Joined: 05-November 04

Posted 08 February 2005 - 01:14 AM

Had already tried these with no luck :(

The shutdown command works when I use it in RunOnceEx, but doesnt work from GuiRunOnce

#4 User is offline   valter 

  • Professor
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 15-June 04

Posted 08 February 2005 - 09:27 AM

not reallu sure you can use shutdown command from winnt.sif file ...

#5 User is offline   cartman02au 

  • Newbie
  • Group: Members
  • Posts: 18
  • Joined: 05-November 04

Posted 08 February 2005 - 05:52 PM

Where is the best place to add the registry entries?

#6 User is offline   valter 

  • Professor
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 15-June 04

Posted 09 February 2005 - 02:48 PM

make a file called registry.reg and call it from runonce.cmd

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