Jump to content

Recommended Posts

Posted (edited)

I'm stumped (not very adept at this).

I need to launch a script that will wait if rundll32 is doing a Plug and Play event in XP. I have a script that blocks the new hardware agent. I need to do this to install drivers in a particular order.

Rundll32 is called with a commandline by Services.exe like so:

rundll32.exe newdev.dll,ClientSideInstall \\.\pipe\PNP_Device_Install_Pipe_0.{<PNP string>}

However, there is no window to get a handle on... ?

Any help is appreciated.

(edit - found this link for Visual Studio

CMP_WaitNoPendingInstallEvents)

Edited by ModemJunki

Always carry a towel.

Posted (edited)

I'm stumped (not very adept at this).

I need to launch a script that will wait if rundll32 is doing a Plug and Play event in XP. I have a script that blocks the new hardware agent. I need to do this to install drivers in a particular order.

Rundll32 is called with a commandline by Services.exe like so:

rundll32.exe newdev.dll,ClientSideInstall \\.\pipe\PNP_Device_Install_Pipe_0.{<PNP string>}

However, there is no window to get a handle on... ?

Any help is appreciated.

(edit - found this link for Visual Studio

CMP_WaitNoPendingInstallEvents)

are you firing the rundll32 instances you're waiting on? if so, assign the RUN() that launches them to a variable and then use processexists() in a while loop to wait for it to end, or just use runwait() to run your rundll32's. Edited by cameronsdad
Posted

are you firing the rundll32 instances you're waiting on? if so, assign the RUN() that launches them to a variable and then use processexists() in a while loop to wait for it to end, or just use runwait() to run your rundll32's.

Thanks for the reply.

No, I'm not in control of firing off the DLL - Windows is doing it. My script is running at startup, so I need it to wait until the Plug and Play event closes. My script launches another script that cancels the "Found New Hardware" dialogs that occur during this phase.

For the moment I put up a splash screen and have a 3-minute sleep, but thats less than ideal if the hardware changes and PnP takes longer.

Always carry a towel.

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