Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



Sign in to follow this  
mraeryceos

Runoncex.inf Runs Only If In Windows\inf

Recommended Posts

mraeryceos    0

I am trying to run runonceex.inf called from cmdlines.txt. I place it in the same folder (%OEM%) as cmdlines.txt. One of the windows install log files (setupact.log) shows the error "exit code 0" from rundll32 setupapi.

I try to run it manually from a command prompt and it won't run unless runonceex.inf is located in %windir%\inf, even though I make the working directory to be where runonceex.inf is located.

I read a post somewhere that said if runonceex.inf is called from cmdlines.txt, that it should be located in same folder as cmdlines.txt. I think this is incorrect.

I would like to make use of %1% to access the CD during install, however, I guess %1% in this case is %windir%\inf, and I am stuck for another method to access the cd. Does anyone know of a way to make this work WITHIN THE INF.

Thank you all.

Share this post


Link to post
Share on other sites

mraeryceos    0

I see homiebrah answers my question:

http://www.msfn.org/board/index.php?showtopic=19492&hl=

I received the same error message when running the following commands straight from cmdlines.txt:

"rundll32 setupapi,InstallHinfSection XP 128 runonceex.inf"

"rundll32.exe iernonce.dll,RunOnceExProcess"

The location of runonceex.inf was in the $OEM$ folder, but it was not being read for some reason. The second command generated the error message you saw.

To fix it, I modified the path of the first command by adding a .\ in front of runonceex.inf and having both command run in a .cmd file called upon by cmdlines.txt. It ran flawlessly with no errors.

Share this post


Link to post
Share on other sites

You can run the .inf from cmdlines.txt (I know cause I do it) but you have to put a specific path (ie C:\APPS\WHATEVER) or have it be alongside cmdlines.txt.

Also you can run the .inf straight from the .inf file you add the following lines at the end.

HKLM,"%RunOnce%\Setup","",0,"rundll32 iernonce,RunOnceExProcess"

[strings]

RunOnce = "Software\Microsoft\Windows\CurrentVersion\RunOnce"

Share this post


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

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×