rjs1980 Posted June 30, 2004 Posted June 30, 2004 Hi.For starters, here are my files:cmdlines.txt[Commands]".\RunOnceEx.cmd"RunOnceEx.cmdCMDOW @ /HIDrundll32.exe setupapi,InstallHinfSection DefaultInstall 128 .\RunOnceEx.infrundll32.exe iernonce.dll,RunOnceExProcessRunOnceEx.inf[Version]Signature=$CHICAGO$[DefaultInstall]AddReg = InstApps[instApps]HKLM,"%SKEY%",,0x00000012HKLM,"%SKEY%",Title,0x00000000,"Installing Applications"HKLM,"%SKEY%",Flags,0x00010001,0x00000020HKLM,"%SKEY%\",Title,0,"Installing Applications"HKLM,"%SKEY%\",Flags,0x00010001,20HKLM,"%SKEY%\000",,,"Adaptec ASPI"HKLM,"%SKEY%\000",000,,"""%1%\INST\ASPI\ASPIINST.EXE"" FORCE SILENT"[strings]SKEY="SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"Ok, what i'm trying to do is use RunOnceEx from cmdlines.I want to run the setup files from the cd instead of the HD withoutthe need for copying/erasing files from the HD.This works prefectly on my comp, so I'm sure I have the inf stuff correct.However, I did notice a KB article from MS stating that there is a knownbug in the RunOnceEx script causing %1% to sometimes report theimproper original installation directory for the inf. Since I could notget the %1% variable to work properly through a normal RunOnceExT-13 installation (it kept reporting that %1%\...\Whatever couldn't be found),I thought a work around may be to install and execute the runonce commandswhen I was absolutely sure of the base directory of the starting program.Any how, with the current configuration (with or without the CMDOW command)when T-13 hits and cmdlines is processed the batch file is launched andimmediately closes. The RunOnceEx gui listing the installs pending nevercomes up, so there is an error in the calls to rundll32. I've looked overthis quite a few times (several hours now), and I have yet to notice whatcould be wrong.Any help with this would be greatly appreciated. Perhaps I'll still have somehair left when this is over with.
GreenMachine Posted June 30, 2004 Posted June 30, 2004 I doubt this will work:rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 .\RunOnceEx.infYou probably need to pass the correct path to RunOnceEx.inf, e.g.rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 D:\$OEM$\RunOnceEx.infYou wiill need to be sure that D is the CD drive (if hardcoded), or devise a way to have the correct CD Drive letter in a variable. Try first hardcoded, for easier debugging ...
rjs1980 Posted June 30, 2004 Author Posted June 30, 2004 Thanks for the response Greenmachine.As far as the non-hardcoded file is concerned, it works properly whenit's ran under windows.If i'm not mistaken, cmdlines.txt is defaulted to \$OEM$\ as the pathyou are at during execution.It seems that running rundll32....... .\RunOnceEx.inf would work properlysince it's being run from the same cmd file, and since cmdlines.txthas a path of \$OEM$\, then .\RunOnceEx.inf should point to \$OEM$\RunOnceEx.infI will try the other ways though. I also just noted I had left my $OEM$ folder in i386 (did a network installearlier), so...none of the files existed where they should have. I'll try your suggestions and i'll retry what I had done.Thanks alot.
GreenMachine Posted June 30, 2004 Posted June 30, 2004 As far as the non-hardcoded file is concerned, it works properly whenit's ran under windows.Irrelevent ... This is not under windows ...It seems that running rundll32....... .\RunOnceEx.inf would work properlysince it's being run from the same cmd file, and since cmdlines.txthas a path of \$OEM$\, then .\RunOnceEx.inf should point to\$OEM$\RunOnceEx.infDoesn't work that way. .\PROGRAM.EXE is OK as a call, but not as a passed parameter (sometimes ... )
Alanoll Posted June 30, 2004 Posted June 30, 2004 you could always try %CD% and see what it gives you. (Current Directory variable)you always just call the rundll32 commands from cmdlines.txt itself, and negate the whole issue of paths....what value are you trying to get for %1%?I use %1% in mine to get the directory the INF was executed from, and it works fine. I have the INF in \Unattend in the root of my CD and %1% points to \Unattend.
rjs1980 Posted June 30, 2004 Author Posted June 30, 2004 For %1% I'm trying to get the value of the path where theINF was installed from. In my case, \$OEM$However, using the instructions in this forum fora pure INF install, whenever I try using %1% asthe beginning of a path in the RunOnceEx registryentires, during the RunOnceEx part of install, every item show %1%\<whatever> can notbe found.I haven't heard of the %CD% variable, i'll try that.One other thing... I have the $OEM$ directory setup in my cd's root path, and I have unattended install and OemPreinstall set to yes.Also, for some reason, %10% isn't returning the %windir% directory.If I use the pure inf install, and do copy the files to the HD under windows (EG: Installs are at %Windows%\INST), RunOnceEx popups up a "%10%\INST\<whatever>" not found error.Is there any other reason this could happen?Thanks for the response, I appreciate it.
Alanoll Posted June 30, 2004 Posted June 30, 2004 [XPlode]HKLM,%RunOnceEx%,"Title",0,"RunOnce Window"HKLM,%RunOnceEx%,"Flags",0x00010001,"0x00000030"HKLM,%RunOnceEx%\install01,,,"Starting XPlode"HKLM,%RunOnceEx%\install01,"1",,"%1%\XPlode.exe /log:#SYSTEMDRIVE#\XPLODE.LOG /xml:#XPlode#\XPlodeRun.xml"This is what I do.and works fine.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now