Jump to content

[GuiRunOnce] wont run.


Recommended Posts

Due to hard drive failure, i lost my unattended settings. Since then i have started the process but for the life of me i cant get guirunonce to work.

Ill attach my winnt.sif, my folder layout and so on.

Winnt.sif:



;SetupMgrTag
[Data]
AutoPartition=0
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=Yes
FileSystem=*
TargetPath=\WINDOWS
UnattendSwitch="yes"
WaitForReboot="No"
DriverSigningPolicy=Ignore

[GuiUnattended]
AdminPassword="LOL WUT"
EncryptedAdminPassword=NO
AutoLogon=Yes
AutoLogonCount=9999999
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1

[UserData]
ProductKey=LOL WUT KEY GOES HERE
FullName="HO HO HO"
OrgName=""
ComputerName=Panda

[GuiRunOnce]
Command0="%systemdrive%\windows\system32\Install.cmd"

[Identification]
JoinWorkgroup=WORKGROUP

[Networking]
InstallDefaultComponents=Yes

My install.cmd is in "\$OEM$\$$\System32". when i double click the file, everything goes great. It just wont run the file on its own at first login.

Install.cmd:

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f


REG ADD %KEY%\002 /VE /D "Steam" /f
REG ADD %KEY%\002 /V 1 /D "%systemdrive%\install\Applications\steam.msi /qn" /f

REG ADD %KEY%\002 /VE /D "Additions to Sendto" /f
REG ADD %KEY%\002 /V 1 /D "%systemdrive%\install\Applications\ftp sendto.cmd" /f

REG ADD %KEY%\099 /VE /D "Cleaning Up and Rebooting" /f
REG ADD %KEY%\099 /V 1 /D "%systemdrive%\install\cleanup.cmd" /f

EXIT

The install files are located in $OEM$\$1\Install. I am out of ideas.

Any ideas?

Edited by Mikep7779
Link to post
Share on other sites

[GuiUnattended]
AdminPassword="LOL WUT"
EncryptedAdminPassword=NO
AutoLogon=Yes
AutoLogonCount=9999999
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1

I'm pretty sure you have 3 mistakes with this. You need to have these 3 lines below.

EncryptedAdminPassword="No"
AutoLogon="Yes"
AdminPassword=*

You forgot quotes and password needs to be a *.

Link to post
Share on other sites

Your install.cmd is setup to be run from cmdlines.txt. Comment out or remove the guirunonce section in your winnt.sif.

Move the install.cmd from \$OEM$\$$\System32 to $OEM$ and add "install.cmd" at the end of cmdlines.txt. Leave your install files in the $OEM$\$1\install folder.

Link to post
Share on other sites
Your install.cmd is setup to be run from cmdlines.txt. Comment out or remove the guirunonce section in your winnt.sif.

Move the install.cmd from \$OEM$\$$\System32 to $OEM$ and add "install.cmd" at the end of cmdlines.txt. Leave your install files in the $OEM$\$1\install folder.

Thanks, i dont know why i had it set up that way. I only had a setup from 2 years ago left on a CD, tried to copy some of the stuff over. Guess it didnt work.

Thanks!

Link to post
Share on other sites
Your install.cmd is setup to be run from cmdlines.txt. Comment out or remove the guirunonce section in your winnt.sif.

Move the install.cmd from \$OEM$\$$\System32 to $OEM$ and add "install.cmd" at the end of cmdlines.txt. Leave your install files in the $OEM$\$1\install folder.

Thanks, i dont know why i had it set up that way. I only had a setup from 2 years ago left on a CD, tried to copy some of the stuff over. Guess it didnt work.

Thanks!

Did what you said, and then i rechecked everything. Still no go. All the files end up on the HDD, but the cmd just isnt running. I have to be missing somthing else.

Here are more of the settings"

cmdlines.txt:

[COMMANDS]
"Install.cmd"

I have my Install.cmd in the $OEM$ with the cmdlines.txt, im just out of idea on why it wont run.

Edited by Mikep7779
Link to post
Share on other sites

Steam install will not work as you overwrite the registry entries with the following SendTo entries. The SendTo entries may fail as whitespace exists in the path in which no double quotes used to keep the path together as one string. I would guess that cleanup will work as expected.

It is mentioned in the unattended guide about using quotes and using a backslash to escape them. Escaped double quotes will be added to registry where as the outer double quotes will not. Below shows your code with escaped double quotes added. Simply clicking on the CMD file adds the entries to the registry for you to examine for being correct. Remove the registry entries when the test is done.

cmdow @ /HID

@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%\002 /VE /D "Steam" /f

REG ADD %KEY%\002 /V 1 /D "\"%systemdrive%\install\Applications\steam.msi\" /qn" /f

REG ADD %KEY%\003 /VE /D "Additions to Sendto" /f

REG ADD %KEY%\003 /V 1 /D "\"%systemdrive%\install\Applications\ftp sendto.cmd\"" /f

REG ADD %KEY%\099 /VE /D "Cleaning Up and Rebooting" /f

REG ADD %KEY%\099 /V 1 /D "\"%systemdrive%\install\cleanup.cmd\"" /f

EXIT

The entries of concern are the entries with known or possible whitespace but I double quoted all to show a thorough example.

:)

Link to post
Share on other sites

Please double-check that you have done the following, as this setup should be working fine :

\$OEM$\cmdlines.txt

\$OEM$\Install.cmd

\$OEM$\$1\Install\

cmdlines.txt :

[COMMANDS]
"Install.cmd"

winnt.sif :

[Unattended]
OemPreinstall=Yes

(+ remove the GuiRunOnce part)

Then you just need to check that all the paths defined in Install.cmd are correct and that if you are on Win2k, then you need to add reg.exe to your install-source...

Also, sorry for nitpicking here, but if you have cmdow.exe on your install-source, then i would ditch the '@echo off' after 'cmdow @ /hid' and instead use '@cmdow @ /hid', but this is unrelated to your issue, though...

Link to post
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...