Jump to content

Problem with RunOnceEx added from .inf


Recommended Posts

hi boys and girls

i have a big problem with runonceex. i need for my wmp11 addon (german) that something runs at first startup best with runonceex. but with the following code runonceex appears while setup!

[Version]
Signature="$Windows NT$"

[Optional Components]
WMP11Files

[WMP11Files]
OptionDesc ="Windows Media Player 11"
Tip ="Windows Media Player 11"
Modes =0,1,2,3
AddReg =WMP11.AddReg

[WMP11.AddReg]
....
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx","Flags",0x10001,0xA38
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx","Title",,"Windows Update"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","",0,"Windows Media Player 11"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","01",0,"%10%\inf\unregmp2.exe /PreInstall"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","02",0,"%10%\inf\unregmp2.exe /RegUniv"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","03",0,"%11%\spupdsvc.exe /install"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","04",0,"%11%\regsvr32.exe /s ""%16422%\Windows Media Player\mpvis.dll"" "
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","05",0,"%11%\regsvr32.exe /s ""%16422%\Windows Media Player\wmpband.dll"" "
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","06",0,"%11%\cmd.exe /C ""%16422%\Windows Media Player\WMPEnc.exe"" /RegServer"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","07",0,"%10%\inf\unregmp2.exe /Shortcuts /RegExts /ObfuscateSyncPlaylists"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","08",0,"%11%\regsvr32.exe /s ""%16422%\Windows Media Player\wmpnssci.dll"" "
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","09",0,"""%16422%\Windows Media Player\WMPNetwk.exe"" install"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","10",0,"%11%\logagent.exe /RegServer"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","11",0,"%11%\spupdsvc.exe /delete"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","12",0,"%10%\WMP.dll.exe /q /norestart /nobackup"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","13",0,"%11%\cmd.exe /C ""del /q/f %10%\WMP.dll.exe"""

and if i use this

[Version]
Signature="$Windows NT$"

[Optional Components]
WMP11Files

[WMP11Files]
OptionDesc ="Windows Media Player 11"
Tip ="Windows Media Player 11"
Modes =0,1,2,3
AddReg =WMP11.AddReg

[WMP11.AddReg]
...

[RunOnceEx]
AddReg=RunOnceEx.AddReg

[RunOnceEx.AddReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx","Flags",0x10001,0xA38
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx","Title",,"Windows Update"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","",0,"Windows Media Player 11"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","01",0,"%10%\inf\unregmp2.exe /PreInstall"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","02",0,"%10%\inf\unregmp2.exe /RegUniv"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","03",0,"%11%\spupdsvc.exe /install"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","04",0,"%11%\regsvr32.exe /s ""%16422%\Windows Media Player\mpvis.dll"" "
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","05",0,"%11%\regsvr32.exe /s ""%16422%\Windows Media Player\wmpband.dll"" "
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","06",0,"%11%\cmd.exe /C ""%16422%\Windows Media Player\WMPEnc.exe"" /RegServer"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","07",0,"%10%\inf\unregmp2.exe /Shortcuts /RegExts /ObfuscateSyncPlaylists"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","08",0,"%11%\regsvr32.exe /s ""%16422%\Windows Media Player\wmpnssci.dll"" "
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","09",0,"""%16422%\Windows Media Player\WMPNetwk.exe"" install"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","10",0,"%11%\logagent.exe /RegServer"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","11",0,"%11%\spupdsvc.exe /delete"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","12",0,"%10%\WMP.dll.exe /q /norestart /nobackup"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\WMP11","13",0,"%11%\cmd.exe /C ""del /q/f %10%\WMP.dll.exe"""

and add this line into guirunonce option from nlites entries.ini

RunDll32.exe %11%\AdvPack.Dll,LaunchINFSection %17%\wmp11.inf,RunOnceEx

then it doesnt run at first startup!

so does anybody of you have a .inf code which can help me to run this runonceex stuff at first startup? cmdlines.txt i cannot edit with nlite.

Edited by Sereby
Link to comment
Share on other sites


i know and that shouldnt be a problem and this should be .inf files..

where is the difference if i add the reg keys with a .inf and they run or if i use the inf to add the reg keys from a.reg file and they run? i can say it you.. there is no difference ^^

Link to comment
Share on other sites

i dont know what the 'Flags' entry do???

try the 'rundll32 setupapi.dll,InstallHInfSection' method instead of LaunchINFSection

and the do a dry run by 'rundll32 iernonce.dll,RunOnceExProcess'

try to simplify the paths like %10%\inf ==> %17%

errs like wmp.dll.exe

Link to comment
Share on other sites

Did you ever stop to think, that nLite has NO idea what the INF Directory IDs mean? %11% is useless to it, you'll need to use normal DOS variables. Even using this method, RunOnceEX will execute on the NEXT restart unless you force it.

As for one the first scenario doesn't work....

They're imported when WMP is installed, and a RunOnceEX call is made later on. The entries are deleted once RunOnceEX has executed.

What you could do instead, is create a seperate INF file, execute the INF directive at CMDLINES.TXT and then they'll execute at first logon.

Link to comment
Share on other sites

tell me how i can call this inf file from CMDLINES.TXT if i want to make a nlite addon! i kno if i could add lines into it it would be no problem but i cant add lines into it if i want to make it as an addon.

and %17% is %windir%\inf yes and that has nothing todo with nlite because its an .inf file which is called during parsing sysoc.inf..

Link to comment
Share on other sites

tell me how i can call this inf file from CMDLINES.TXT if i want to make a nlite addon! i kno if i could add lines into it it would be no problem but i cant add lines into it if i want to make it as an addon.

No idea. You'll have to find out yourself. I personally hate the AddOn. Now, you could just make a simple TXT file and copy it over yourself before creating the ISO.

and %17% is %windir%\inf yes and that has nothing todo with nlite because its an .inf file which is called during parsing sysoc.inf..

I'm aware what %17% means, I was just explaining why

RunDll32.exe %11%\AdvPack.Dll,LaunchINFSection %17%\wmp11.inf,RunOnceEx

didn't work.

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