Nmap Development mailing list archives
RE: silent installation of Nmap-WinPcap to a specific directory
From: "Rob Nicholls" <robert () everythingeverything co uk>
Date: Fri, 20 Jun 2008 12:37:41 +0100
Hi, I'm afraid you can't currently change the location where WinPcap is installed when you perform a silent installation of Nmap, as you've rightly pointed out it's hardcoded into Nmap's installer. However, as a workaround (although I've not tried it as I'm at work), I believe the current installer logic should allow you to run our version of the WinPcap installer (that you can obtain from nmap-4.65-win32.zip) after you've installed Nmap, specifying the new location where you want WinPcap to be installed. A silent installation of WinPcap bypasses the version check when wpcap.dll is present, then runs the WinPcap uninstaller, then installs WinPcap to the new location you've specified at the command line. e.g.
nmap-4.65-setup.exe /S /D="C:\tools\Nmap\" winpcap-nmap-4.02.exe /S /D="C:\tools\WinPcap\"
I'll look into modifying the Nmap installer to accept a new parameter that states where to install WinPcap, probably based on http://nsis.sourceforge.net/Get_Parameter_Value unless I can find/write something simpler. I suspect /W would be a fairly logical choice, e.g. /W="C:\tools\WinPcap\", with Nmap's installer passing the default Program Files folder if /W hasn't been specified. As an aside, I've noticed that when our (silent) WinPcap calls the uninstaller because wpcap.dll is present, a GUI will appear if WinPcap was installed using the official installer (as their uninstaller doesn't support a silent uninstall). I can't think of a workaround for that, other than updating our installer to (inelegantly) manually delete some of WinPcap's registry keys and files and stop the npf service before we continue with our installation, rather than run their uninstaller (but only for a silent install). Do people think it's worth us worrying about/proactively fixing? Rob
-----Original Message----- From: EBIHARA, Yuichiro [mailto:ebihara () iplocks co jp] Sent: 20 June 2008 10:51 To: nmap-dev () insecure org Subject: silent installation of Nmap-WinPcap to a specific directory Hi, Nmap 4.65 supports silent installation for Nmap and Nmap-WinPcap. This is a great enhancement and I tried it.nmap-4.65-setup.exe /S /D=C:\tools\NmapNmap is installed in C:\tools\nmap as I expected and WinPcap is installed in C:\Program Files\WinPcap. Actually, I want to install WinPcap in C:\tools\WinPcap and I wonder if I can specify the destination directory for WinPcap. I looked into the source file, mswin32/nsis/Nmap.nsi, and I found the following lines. winpcap_silent: ExecWait '"$INSTDIR\winpcap-nmap-4.02.exe" /S /D=$\""$PROGRAMFILES\WinPcap\"$\"' It seems $PROGRAMFILES is replaced with the system's default program files directory. Is there any way to temporarily change it without updating the Windows registry? Thanks in advance, ebi _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- silent installation of Nmap-WinPcap to a specific directory EBIHARA, Yuichiro (Jun 20)
- RE: silent installation of Nmap-WinPcap to a specific directory Rob Nicholls (Jun 20)
- Message not available
- Re: silent installation of Nmap-WinPcap to a specific directory EBIHARA, Yuichiro (Jun 22)
- Message not available
- RE: silent installation of Nmap-WinPcap to a specific directory Rob Nicholls (Jun 20)