Jump to content

RunOnceEx.inf help


Recommended Posts

Whenever I try to launch "RunOnceEx.inf" from the command prompt, I always get the error "Failed to Install". I am using the command:

rundll32 setupapi,InstallHinfSection DefaultInstall 128 RunOnceEx.inf

On my unnatended install the RunOnceEx.inf gets launched from "cmdlines.txt" using the above command. It does not work during the install either, which means my apps don't get installed. Here is my "RunOnceEx.inf" code, perhaps I'm missing something.

[Version]Signature=$CHICAGO$
[DefaultInstall]AddReg=RunOnceEx
[RunOnceEx]HKLM,"%key%\",Title,0,"Installing Applications"HKLM,"%key%\",Flags,0x00010001,20
HKLM,"%key%\005",,,"AC3Filter 0.70b"HKLM,"%key%\005",1,,"%24%\Install\Adobe\ac3filter_0_70b.exe /S"
HKLM,"%key%\010",,,"Adobe Reader 6.0.1"HKLM,"%key%\010",1,,"%24%\Install\Adobe\AdbeRdr60_enu_full.exe -p"""-s /v\"""/qn\"""
HKLM,"%key%\015",,,"Alcohol 120% 1.9.2.1705"HKLM,"%key%\015",1,,"%24%\Install\Alcohol\Alcohol120_1921705.msi /qn"HKLM,"%key%\015",2,,"REGEDIT /S %24%\Install\Alcohol\register.reg"
HKLM,"%key%\017",,,"Kazaa 2.0.2"HKLM,"%key%\017",1,,"%24%\Install\Kazaa\kazaa202.exe /S"
HKLM,"%key%\020",,,"Nero Burning Rom 6.3.1.10"HKLM,"%key%\020",1,,"%24%\Install\Nero\Nero63110.exe /SILENT /NOREBOOT /SN=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx /WRITE_SN"
HKLM,"%key%\025",,,"Skype 0.97"HKLM,"%key%\025",1,,"%24%\Install\Skype\SkypeSetup-Beta.exe /verysilent /sp-"
;HKLM,"%key%\030",,,"Symantec AntiVirus 9 Corporate";HKLM,"%key%\030",1,,"%24%\Install\SAV\savclnt.exe /qn"
HKLM,"%key%\040",,,"WinRAR 3.30"HKLM,"%key%\040",1,,"%24%\Install\WinRAR\wrar330.exe /s"
HKLM,"%key%\050",,,"Cleaning up and rebooting"HKLM,"%key%\050",1,,"%24%\Install\cleanup.bat"
[strings]key="SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"
Link to comment
Share on other sites


Make sure your apps are on c:\install, then run the inf then see if you get the same error. If you do put a semi colon in front of each section to narrow down what part is incorrect. Delete setupapi.log, run the inf, then look at setupapi.log to see what is wrong. Runonceex.inf in your example should be in the same folder as cmdlines.txt

-gosh

Link to comment
Share on other sites

Well it isn't the inf file that has the problem. Infact my "RunOnceEx.inf" is not even getting run. I've tried several other infs from the command prompt, and it always comes up with "Failed to Install".

Gosh, I tried the setupapi.log thing, and after I deleted it, it hasn't been remade.

Well, could it be something to do with DDE (dynamic data exchange)? When I open up "File Types" in "Folder Options", the command to install infs has a checkbox checked named DDE.

The infs will install fine if I right click on them and click on install, but when I try to run the same command from the command prompt I get the error. I've tried this on a XP SP1 and XP SP2 RC1 machine with the same results.

Any ideas?

I attatched a picture of the screen that shows the command that is run by clicking install.

Link to comment
Share on other sites

Add the path, i just merged your's from a command prompt like this.

rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 C:\Install\RunOnceEx.inf

Also mine has a 132 in my registry and yours says 128, I am not sure which should be probably Gosh know's since he does the inf's more.

Link to comment
Share on other sites

Thank you very much maxXPsoft, that did the trick. Just FYI though these are the meanings for the different numbers

NeverReboot

Set <reboot-mode> to 0 or 128.  Whatever happens, the PC will not be rebooted.  Its up to the client to determine if the PC should be rebooted.  For Setup, this means there is a file C:\WINDOWS\WININIT.INI that is not zero bytes in size.

AlwaysSilentReboot

Set <reboot-mode> to 1 or 129.  The user will not be prompted with a "Reboot the machine, Yes/No" dialog and the PC will always reboot.

AlwaysPromptReboot

Set <reboot-mode> to 2 or 130.  The user will always be asked to respond to a "Reboot the machine, Yes/No" dialog.  Setup does not attempt to determine if a reboot is necessary.

SilentReboot

Set <reboot-mode> to 3 or 131.  If Setup determines that the PC needs to reboot, there is no user interaction.

PromptReboot

Set <reboot-mode> to 4 or 132.  If Setup determines that the PC needs to reboot, it prompts the user with a "Reboot the machine, Yes/No" dialog.

I guess I really want the 'NeverReboot' one though.

Any idea why this command requires the full path?

Oh well it really doesn't matter, but thank you very much maxXPsoft.

Link to comment
Share on other sites

:) Well thank you back cause I just never looked up that number stuff.

Got it copied now and will change mine to 128

Path is required I believe because normally the command in the registry has the %1 on the end which return's path to highlighted file.

Maybe theres a work around but I haven't looked that hard yet. Using those in runonceex you definetly want the path or variables.

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