Link to home
Start Free TrialLog in
Avatar of AlexIraMty
AlexIraMty

asked on

How to unistall Device Drivers via MSI with DPInst?

Hi all. I have a doubt a bout how to unistall device drivers via MSI.

We are now install the drivers via MSI using as custom action a VBScript and when we plug the device in it works perfectly but now we have a new problem. The problem is unistall those drivers.

When uninstalling we use a very similar VBScript as when installing, somethin like this:

Dim oShell
Dim source Set
oShell = CreateObject ("WSCript.shell")
dir = oShell.ExpandEnvironmentStrings("%Temp%")
dir2 = oShell.ExpandEnvironmentStrings("%windir%")
source = dir + "\Device Drivers\"
dir2=  dir2 + "\system32\DRVSTORE\"
oShell.Run "cmd /k"+" cd"+" "+source+"DPInst_x86 & DPInst.exe /s /u "+" "+dir2+"toaster_4644C6CF04F87E5745CAF63D887EAACCF779346F\hpzid413.inf", vbhide


If we run this script manualy, it unistalls correclty  the Driver but when we try to run it from a CustomAction from the MSI when Removing the application.

We are not pretty sure of what sequence number set for that action on InstallExecuteSequence Table.

Well that´s our problem.  I hope some of you could help us.

Bye bye...
ASKER CERTIFIED SOLUTION
Avatar of Hubasan
Hubasan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial