Capitanotex
25th January 2007 14:34 UTC
Uninstalling a device from device manager
Hi, I have to do the following things using NSIS
1. Open a DOS window and call the "RTC3SETUP.exe" or "RTC4SETUP.exe" setup
program with the command line parameter "remove". That means, enter
RTC3Setup remove
on the Command Prompt, if you want to remove RTC3 drivers.
2. Call System | Device Manager and right-click "Uninstall" on the SCANLAB entry: "RTC3: Real Time Scanner Controller".
Delete the files WINDRVR.SYS and WDUSB.SYS from directory:
..\"WINDOWS"\system32\drivers
3. By means of the WINDOWS Explorer, search all files of the directory:
..\"WINDOWS"\inf
for the word "RTC3". Delete all files that contain the word "RTC3".
4. Restart the computer.
I'd like to know how to uninstall the device from the Device Manager using NSIS script.
Thanks
Capitanotex
29th January 2007 09:05 UTC
I have tried to use InstDrv plugin, with InstDrv::RemoveAllDevices, but the process give me a "Fatal error!" message. InstDrv::CountDevices returns 1 device correctly.
Thanks
fishweasel
29th January 2007 12:14 UTC
Hi,
i would use something like the following for 1:
nsExec::ExecToStack '"C:\RTC3SETUP.exe" /remove'
or
ExecWait '"C:\RTC3SETUP.exe" /remove'
(not sure if you would need the leading /)
Not sure about removing devices - most likely a reg key could be your best bet ?
I use a batch file to reboot my machine, but you could pass the command directly :
shutdown -r -t 03 -c "Rebooting, Please wait..." -f
You can get the full list of arguments by typing 'shutdown /?' at the command line.
Capitanotex
30th January 2007 15:40 UTC
Thanks fishweasel.
Regarding the removing of the device I have a doubt about the drvHWID of the device to pass to
InstDrv::InitDriverSetup
Is it possible that it is PCI\VEN_104C&DEV_AC60&SUBSYS_34435452&REV_00
or something like this?
Sorry for my bad english.
Thanks
onad
1st February 2007 17:22 UTC
drvHWID
= Driver HardWare ID
consists of manufacturer and subdevice.
VEN_104C
VEN =Vendor the Hex number which vendor it is you can find this on the internet in Vendor tables.
DEV_AC60
DEV = Device. The device for which the driver is.