Jump to content

Unattended Setup Stalls between Mini-Setup and GuiRunOnce


Recommended Posts

My unattended setup stalls between mini-setup and GuiRunOnce command execution. The user must manually logoff or restart after adding a user in the mini-setup. Once that has been done, GuiRunOnce commands execute as expected.

Textmode setup completes as expected. CMDLINES.TXT is called, does its thing (HKCU tweaks). Next mini-setup kicks in, asks about WU, LAN, and asks for a user name. I want this operation - it forces users to create an Administrator not named Administrator). I enter a user name, click next then finish. Setup then presents a desktop with my newly created user logged and stalls until a user manually logs off or restarts. Then GuiRunOnce commands execute.

It only takes a logoff/restartto get things going again. How do I get setup to perform that logoff/restart without user intervention. That is, how do I eliminate the "stall" between the end of mini-setup and the start of GuiRunOnce commands?

It's got to be something simple, any suggestions appreciated. I tried, but while searching the forums was educational, I just got too many hits to read everything on "mini-setup/runonce/stall/restart" searches.

Thanks.

Dave

WINNT.SIF

[Data]
AutoPartition = 0
MsDosInitiated = 0
UnattendedInstall = Yes

[Unattended]
UnattendMode = FullUnattended
UnattendSwitch = No
DriverSigningPolicy = Ignore
FileSystem = *
Hibernation = No
OemPreinstall = Yes
OemSkipEula = Yes
TargetPath = \WINDOWS
WaitForReboot = No
NoWaitAfterGUIMode=1
NoWaitAfterTextMode=1

[GuiUnattended]
AdminPassword = *
OEMSkipRegional = 1
OemSkipWelcome = 1
TimeZone = 035

[UserData]
ProductKey = XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
FullName = XXX
OrgName = XXX
ComputerName = COMPUTER1

[Display]
BitsPerPel = 32
Xresolution = 1024
YResolution = 768
Vrefresh = 75
AutoConfirm = 1

[TapiLocation]
CountryCode = 1
Dialing = Tone
AreaCode = 999

[RegionalSettings]
LanguageGroup = 1
Language = 0409

[Identification]
JoinWorkgroup = MSHOME

[Networking]
InstallDefaultComponents = Yes

[Components]
msmsgs = off
freecell = off
hearts = off
minesweeper = off
pinball = off
solitaire = off
spider = off
zonegames = off

[Shell]
DefaultStartPanelOff = No
DefaultThemesOff = No

[GuiRunOnce]
Command0="nircmd exec hide %systemdrive%\install\xp\runonceex.cmd"

[IEPopupBlocker]
BlockPopups = Yes
FilterLevel = Low
ShowInformationBar = Yes

[WindowsFirewall]
Profiles = WindowsFirewall.TurnOffFirewall

[WindowsFirewall.TurnOffFirewall]
Mode = 0


Home_Page = [url="http://www.google.ca"]http://www.google.ca

RunOnceEx.cmd

: RunOnceEx.cmd
setlocal enableextensions
set cdrom=%~d0
set key=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
reg add "%key%" /f /v title /d "Installing Applications"
reg add "%key%\005" /f /ve /d "Registry Tweaks"
reg add "%key%\005" /f /v 1 /d "%systemdrive%\install\xp\hklm.cmd"
reg add "%key%\010" /f /ve /d "Adobe Acrobat Reader 9.0"
reg add "%key%\010" /f /v 1 /d "%systemdrive%\install\acrobat\AdobeReader90.exe /sAll /rs"
endlocal

HKLM.CMD

: HKLM.CMD
setlocal enableextensions
set key=HKLM\Software\Microsoft
reg add "%key%\MessengerService\Policies" /v "DisableCrossPromo" /t reg_binary /d 80 /f
rem etc...
endlocal

CMDLINES.TXT

[COMMANDS]
"nircmd exec hide .\$1\install\xp\hkcu.cmd"

HKCU.CMD

: HKCU.CMD
setlocal enableextensions
reg add "HKCU\Control Panel\Desktop" /v MenuShowDelay /t reg_sz /d 100 /f
rem etc....
endlocal

Link to comment
Share on other sites


The issue would be that you execute RunOnceEx.cmd with GuiRunOnce which is after the event of the RunOnceEx key being processed. You can keep your current concept and make it work immediately by adding one line to RunOnceEx.cmd. Calling the ierunonce.dll can do this for you.

RunOnceEx.cmd

: RunOnceEx.cmd
setlocal enableextensions
set cdrom=%~d0
set key=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
reg add "%key%" /f /v title /d "Installing Applications"
reg add "%key%\005" /f /ve /d "Registry Tweaks"
reg add "%key%\005" /f /v 1 /d "%systemdrive%\install\xp\hklm.cmd"
reg add "%key%\010" /f /ve /d "Adobe Acrobat Reader 9.0"
reg add "%key%\010" /f /v 1 /d "%systemdrive%\install\acrobat\AdobeReader90.exe /sAll /rs"
start /wait rundll32.exe iernonce.dll,RunOnceExProcess
endlocal

:)

Link to comment
Share on other sites

start /wait rundll32.exe iernonce.dll,RunOnceExProcess

WHOO-HOO!

Thanks a million. That's just what the doctor ordered! Adding the above line to the end of GuiRunOnce commands did the trick. Setup continues as expected and, when done, XP is installed with all the required software.

I'll polish and generisize the whole and post as a reply for all later today. Again, thanks for the insight, I can now stop banging my head.

Dave

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