Jump to content

Recommended Posts

Posted

Hi.

For starters, here are my files:

cmdlines.txt

[Commands]".\RunOnceEx.cmd"

RunOnceEx.cmd

CMDOW @ /HID

rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 .\RunOnceEx.inf

rundll32.exe iernonce.dll,RunOnceExProcess

RunOnceEx.inf
[Version]

Signature=$CHICAGO$

[DefaultInstall]

AddReg = InstApps

[instApps]

HKLM,"%SKEY%",,0x00000012

HKLM,"%SKEY%",Title,0x00000000,"Installing Applications"

HKLM,"%SKEY%",Flags,0x00010001,0x00000020

HKLM,"%SKEY%\",Title,0,"Installing Applications"

HKLM,"%SKEY%\",Flags,0x00010001,20

HKLM,"%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 without

the 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 known

bug in the RunOnceEx script causing %1% to sometimes report the

improper original installation directory for the inf. Since I could not

get the %1% variable to work properly through a normal RunOnceEx

T-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 commands

when 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 and

immediately closes. The RunOnceEx gui listing the installs pending never

comes up, so there is an error in the calls to rundll32. I've looked over

this quite a few times (several hours now), and I have yet to notice what

could be wrong.

Any help with this would be greatly appreciated. Perhaps I'll still have some

hair left when this is over with. :)


Posted

I doubt this will work:

rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 .\RunOnceEx.inf

You probably need to pass the correct path to RunOnceEx.inf, e.g.

rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 D:\$OEM$\RunOnceEx.inf

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

Posted

Thanks for the response Greenmachine.

As far as the non-hardcoded file is concerned, it works properly when

it's ran under windows.

If i'm not mistaken, cmdlines.txt is defaulted to \$OEM$\ as the path

you are at during execution.

It seems that running rundll32....... .\RunOnceEx.inf would work properly

since it's being run from the same cmd file, and since cmdlines.txt

has a path of \$OEM$\, then .\RunOnceEx.inf should point to

\$OEM$\RunOnceEx.inf

I will try the other ways though.

I also just noted I had left my $OEM$ folder in i386 (did a network install

earlier), 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.

Posted
As far as the non-hardcoded file is concerned, it works properly when

it's ran under windows.

Irrelevent ... This is not under windows ...
It seems that running rundll32....... .\RunOnceEx.inf would work properly

since it's being run from the same cmd file, and since cmdlines.txt

has a path of \$OEM$\, then .\RunOnceEx.inf should point to

\$OEM$\RunOnceEx.inf

Doesn't work that way. .\PROGRAM.EXE is OK as a call, but not as a passed parameter (sometimes ... )
Posted

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.

Posted

For %1% I'm trying to get the value of the path where the

INF was installed from. In my case, \$OEM$

However, using the instructions in this forum for

a pure INF install, whenever I try using %1% as

the beginning of a path in the RunOnceEx registry

entires, during the RunOnceEx part of install,

every item show %1%\<whatever> can not

be found.

I haven't heard of the %CD% variable, i'll try that.

One other thing... I have the $OEM$ directory set

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

Posted

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

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