MSFN Forum: Runoncex.inf Runs Only If In Windows\inf - MSFN Forum

Page 1 of 1

Runoncex.inf Runs Only If In Windows\inf Rate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.msfn.org/board/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=40266&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

#1mraeryceos

• Member
• Group: Members
• Posts: 181
• Joined: 11-April 04

Posted 27 February 2005 - 05:08 PM

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.

#2mraeryceos

• Member
• Group: Members
• Posts: 181
• Joined: 11-April 04

Posted 27 February 2005 - 06:56 PM

I see homiebrah answers my question:
http://www.msfn.org/board/index.php?showtopic=19492&hl=

Quote

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.

#3Ghost82

• Member
• Group: Members
• Posts: 138
• Joined: 21-November 04

Posted 28 February 2005 - 01:42 AM

the RunOnceEx file should be a .cmd file! I think cmdlines.txt only allows executable files (*.cmd,*.exe etc...)

#4mraeryceos

• Member
• Group: Members
• Posts: 181
• Joined: 11-April 04

Posted 28 February 2005 - 05:58 AM

Let me introduce you to inf world:

http://gosh.msfnhosting.org

#5Stinger12348

• Junior
• Group: Members
• Posts: 78
• Joined: 31-July 03

Posted 28 February 2005 - 09:16 AM

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"

Page 1 of 1