Nmap Development mailing list archives
Re: New Years Day Release: Nmap 4.52
From: "Rob Nicholls" <robert () everythingeverything co uk>
Date: Wed, 2 Jan 2008 17:43:47 -0000 (UTC)
IIRC you can also kill the process(es) using a plugin for NSIS
It looks like you can use PSAPI or the plugins to do it: http://nsis.sourceforge.net/Get_a_list_of_running_processes But neither methods work on 9x (Nmap still appears to officially support Windows Me). So I haven't added support for detecting running processes and warning the user into this patch. I also noticed, when doing initial testing, that the Processes plugin doesn't appear to perform a particularly strict match, as it'll match when looking for "nmap" if zenmap.exe is running, so I suspect PSAPI might be the better way, especially as it doesn't require Windows developers to install anything else. According to: http://www.microsoft.com/windows/support/endofsupport.mspx July 11, 2006 brought a close to Extended Support for 98, 98SE and Me as part of the Microsoft Lifecycle Policy. Microsoft no longer provides any phone support or security updates for these products because they consider them obsolete. How much longer will Nmap support Windows Me?
RMDir /r $INSTDIR\Nmap
Did you spot the obvious mistake? Obviously I just mean $INSTDIR, I don't need the trailing "\Nmap" *blush* I've also had to add the line: Delete "$INSTDIR\winpcap-nmap*.exe" to the Uninstaller section, to make up for the fact I'm not recursively deleting the Nmap folder (I believe all the files/folders are specified, so it can delete the folder if it's empty). I've gone with a wildcard so it won't need to be updated whenever the filename changes (unlike higher up in the NSI file, in the SecWinPcap section). This might want to be documented in the Upgrading-Instructions.txt file, just for completeness, even though it won't require updating whenever a new version of WinPcap is out.
http://nsis.sourceforge.net/Validating_$INSTDIR_before_uninstall
I've currently gone for a copy and paste of the code in the above example into two places; it's probably worth rewriting back into a macro at some point to save a few lines. I've also discovered another quirk, it turns out that uninstalling Nmap doesn't remove the shortcuts on Vista. It turns out that: http://nsis.sourceforge.net/Shortcuts_removal_fails_on_Windows_Vista Windows Vista automatically identifies installer executables, including NSIS installers, and asks the user permission to run them with elevated privileges. Automatic detection, however, comes with the price of automatic backward compatibility tricks. One of which is automatic relocation of shortcuts created in the Start Menu to All Users' Start Menu. To workaround this, use the new RequestExecutionLevel command or create the shortcuts in All Users' folders in the first place, using SetShellVarContext. So I've added the line: RequestExecutionLevel admin near the top of the script, which means Vista now creates and deletes the shortcut correctly (and hopefully this might avoid any further compatibility warnings). However, you need to manually delete the existing ("compatible") Nmap folder if one's been created using earlier versions of the setup file, even after installing using the new setting. It's listed as bug #1664957. The example NSI file was updated with NSIS 2.25, I don't know offhand if that means NSIS 2.25 or higher needs to be used to create the setup file, or if older versions continue to work fine (they probably do), but I noticed that the current binaries on the site use NSIS 2.13 (which is almost a year old now). I'm using 2.33 here and it appears to work fine. I've tested it on XP and Vista, it looks like it works okay. As usual, feel free to modify my patch/just use the bits you want ;) Rob
Attachment:
nsi-additions.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- New Years Day Release: Nmap 4.52 Fyodor (Jan 01)
- Re: New Years Day Release: Nmap 4.52 LevelZero (Jan 02)
- Re: New Years Day Release: Nmap 4.52 Rob Nicholls (Jan 02)
- Message not available
- Re: New Years Day Release: Nmap 4.52 Rob Nicholls (Jan 02)
- Re: New Years Day Release: Nmap 4.52 Fyodor (Jan 02)
- Re: New Years Day Release: Nmap 4.52 Ron (Jan 03)
- RE: New Years Day Release: Nmap 4.52 Rob Nicholls (Jan 03)
- Re: New Years Day Release: Nmap 4.52 Ron (Jan 03)
- Re: New Years Day Release: Nmap 4.52 DePriest, Jason R. (Jan 03)
- Re: New Years Day Release: Nmap 4.52 Rob Nicholls (Jan 02)
- Re: New Years Day Release: Nmap 4.52 LevelZero (Jan 02)
- Re: New Years Day Release: Nmap 4.52 Fyodor (Jan 12)