blaze
Posts: 16
Joined: Wed May 23, 2007 7:16 pm
Location: Macrovision
Contact: Website

Custom action - calling function in preexisting file

Hello,

I want to create a custom action for installing PnP device drivers. The "New Custom Action Wizard" has the option of invoking a preexisting file on the target machine disabled. Is this an unimplemented feature in v5.2.1?

What I want to invoke is UpdatePnpDeviceDrivers within Syssetup.dll. I have a search property for Syssetup.dll, but no way to configure the source path of the custom action to the search property.

DOS bat:
START /WAIT RunDll32.exe Syssetup.dll,UpdatePnpDeviceDrivers

--Blaze
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

The Windows Installer custom action support doesn't allow the execution of a function from a DLL located on the target machine. It is not an Advanced Installer limitation. This is the reason why that option is disabled.

For further details please see:
http://msdn2.microsoft.com/en-us/library/aa372048.aspx

Try using AI's driver installation support instead.

http://www.advancedinstaller.com/user-g ... ivers.html

Regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
blaze
Posts: 16
Joined: Wed May 23, 2007 7:16 pm
Location: Macrovision
Contact: Website

Ah, a note in the UI would be nice. I thought I had some setting wrong or it was disabled because it automagically had decided my search property was not quite correct ;-/

I put the DLL function call into a batch script.

The automatic driver installation with DIFx does work up to a point. If and only if the driver is signed is it automatically installed with no use input. That however is not the whole story. Sometimes you need to kick the OS into performing a hardware scan and a PnP scan. On upgrade with an auto-uninstall you also need to fully unload the old driver else you get the OS the new drivers do not load correctly. I'll post the recipe on inquery 1949 in about a week after I finish my tests.

Thanks
--Blaze

Return to “Common Problems”