Nmap Development mailing list archives
[PATCH] WinPcap Installer Improvements
From: "Rob Nicholls" <robert () everythingeverything co uk>
Date: Thu, 11 Sep 2008 09:47:54 +0100
Attached is a patch that fixes two problems with our WinPcap installer: - Silent installs will display the official WinPcap GUI uninstaller (and wait for user interaction) if upgrading from an official WinPcap install. - The npf service is not correctly registered/deleted during the install/uninstall on Windows 2000 (as a temporary fix we had been using sc.exe, which is only available by default on XP and above). The first problem is fixed/mitigated by checking the official WinPcap's registry key and deleting the corresponding files and registry keys to make it look like it was uninstalled (fine, as long as newer WinPcap installers don't do anything different). The npf service is stopped and the files that were in use are then overwritten by our installer. It also checks if our installer was used, and skips running an uninstaller if wpcap.dll is present but we can't work out how it got there (as third party software may potentially install it themselves). Hopefully this should make silent installs a lot smoother. The second problem was fixed by ditching the use of sc.exe and switching to Windows API calls through NSIS. Because older versions of our installer don't always correctly delete the npf service during the uninstall, I've added code to delete any existing npf service before we create the new one. This ensures that an error message isn't displayed if it tries to create the npf service when it already exists. The uninstaller now correctly deletes the service. I've tested it on a fully patched Server 2000, fully patched XP SP3 and fully patched Vista SP1 setup and it appears to work okay. Rob
Attachment:
winpcap_installer_improvements.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCH] WinPcap Installer Improvements Rob Nicholls (Sep 11)
- Re: [PATCH] WinPcap Installer Improvements Fyodor (Sep 11)