1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-11 10:19:03 +00:00

merge soc07 r4852:4858 - Added nmap specific information (name/lang/company/copyright etc.) to windows installer. Need to come up with a way to automate the version information in both the .rc and the .nsis file. Now nmap registers with add/remove programs. Updated winpcap to version 4.0. winpcap 4.0 - removed files no longer needed from winpcap 3.1 installtion.

This commit is contained in:
fyodor
2007-08-11 03:56:32 +00:00
parent e64e2518e3
commit cb799fcef9
10 changed files with 31 additions and 21 deletions

View File

@@ -20,6 +20,15 @@
;Get installation folder from registry if available ;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\Nmap" "" InstallDirRegKey HKCU "Software\Nmap" ""
VIProductVersion 4.2.0.7
VIAddVersionKey /LANG=1033 "FileVersion" "4.20ALPHA7"
VIAddVersionKey /LANG=1033 "ProductName" "Nmap"
VIAddVersionKey /LANG=1033 "CompanyName" "Insecure.org"
VIAddVersionKey /LANG=1033 "InternalName" "NmapInstaller.exe"
VIAddVersionKey /LANG=1033 "LegalCopyright" "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)"
VIAddVersionKey /LANG=1033 "LegalTrademark" "NMAP"
VIAddVersionKey /LANG=1033 "FileDescription" "Nmap installer"
;-------------------------------- ;--------------------------------
;Interface Settings ;Interface Settings
@@ -65,6 +74,7 @@ Section "Nmap Core Files" SecCore
File ..\nmap_performance.reg File ..\nmap_performance.reg
File ..\..\README-WIN32 File ..\..\README-WIN32
File /r ..\..\scripts File /r ..\..\scripts
File ..\icon1.ico
;Store installation folder ;Store installation folder
WriteRegStr HKCU "Software\Nmap" "" $INSTDIR WriteRegStr HKCU "Software\Nmap" "" $INSTDIR
@@ -72,6 +82,12 @@ Section "Nmap Core Files" SecCore
;Create uninstaller ;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe" WriteUninstaller "$INSTDIR\Uninstall.exe"
; Register Nmap with add/remove programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "DisplayName" "Nmap 4.20ALPHA7"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "DisplayIcon" '"$INSTDIR\icon1.ico"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap" "NoRepair" 1
SectionEnd SectionEnd
Section "Register Nmap Path" SecRegisterPath Section "Register Nmap Path" SecRegisterPath
@@ -79,11 +95,10 @@ Section "Register Nmap Path" SecRegisterPath
Call AddToPath Call AddToPath
SectionEnd SectionEnd
Section "WinPcap 4.0" SecWinPcap
Section "WinPcap 3.1" SecWinPcap File ..\winpcap\winpcap-nmap-4.0.exe
File ..\winpcap\winpcap-nmap-3.1.B.exe Exec '"$INSTDIR\winpcap-nmap-4.0.exe"'
Exec '"$INSTDIR\winpcap-nmap-3.1.B.exe"' Delete "$INSTDIR\winpcap-nmap-4.0.exe"
Delete "$INSTDIR\winpcap-nmap-3.1.B.exe"
SectionEnd SectionEnd
Section "Network Performance Improvements (Registry Changes)" SecPerfRegistryMods Section "Network Performance Improvements (Registry Changes)" SecPerfRegistryMods
@@ -97,7 +112,7 @@ SectionEnd
;Component strings ;Component strings
LangString DESC_SecCore ${LANG_ENGLISH} "Installs Nmap executables and script files" LangString DESC_SecCore ${LANG_ENGLISH} "Installs Nmap executables and script files"
LangString DESC_SecRegisterPath ${LANG_ENGLISH} "Registers Nmap path to System path so you can execute it from any directory" LangString DESC_SecRegisterPath ${LANG_ENGLISH} "Registers Nmap path to System path so you can execute it from any directory"
LangString DESC_SecWinPcap ${LANG_ENGLISH} "Installs WinPcap 3.1 (required for most Nmap scans unless it is already installed)" LangString DESC_SecWinPcap ${LANG_ENGLISH} "Installs WinPcap 4.0 (required for most Nmap scans unless it is already installed)"
LangString DESC_SecPerfRegistryMods ${LANG_ENGLISH} "Modifies Windows registry values to improve TCP connect scan performance. Recommended." LangString DESC_SecPerfRegistryMods ${LANG_ENGLISH} "Modifies Windows registry values to improve TCP connect scan performance. Recommended."
;Assign language strings to sections ;Assign language strings to sections
@@ -134,6 +149,7 @@ Section "Uninstall"
Delete "$INSTDIR\nmap.xsl" Delete "$INSTDIR\nmap.xsl"
Delete "$INSTDIR\nmap_performance.reg" Delete "$INSTDIR\nmap_performance.reg"
Delete "$INSTDIR\README-WIN32" Delete "$INSTDIR\README-WIN32"
Delete "$INSTDIR\icon1.ico"
Delete "$INSTDIR\Uninstall.exe" Delete "$INSTDIR\Uninstall.exe"
@@ -143,7 +159,7 @@ Section "Uninstall"
DetailPrint "Deleting Registry Keys..." DetailPrint "Deleting Registry Keys..."
SetDetailsPrint listonly SetDetailsPrint listonly
DeleteRegKey /ifempty HKCU "Software\Nmap" DeleteRegKey /ifempty HKCU "Software\Nmap"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nmap"
SetDetailsPrint textonly SetDetailsPrint textonly
DetailPrint "Unregistering Nmap Path..." DetailPrint "Unregistering Nmap Path..."
Push $INSTDIR Push $INSTDIR
@@ -151,4 +167,3 @@ Section "Uninstall"
SetDetailsPrint both SetDetailsPrint both
SectionEnd SectionEnd

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,13 +1,14 @@
;; Custom winpcap for nmap ;; Custom winpcap for nmap
;; Started by Doug Hoyte, April 2006 ;; Started by Doug Hoyte, April 2006
;; Updated to 4.0, June 2007
;-------------------------------- ;--------------------------------
; The name of the installer ; The name of the installer
Name "winpcap-nmap-3.1" Name "winpcap-nmap-4.0"
; The file to write ; The file to write
OutFile "winpcap-nmap-3.1.B.exe" OutFile "winpcap-nmap-4.0.exe"
; The default installation directory ; The default installation directory
InstallDir $PROGRAMFILES\WinPcap InstallDir $PROGRAMFILES\WinPcap
@@ -97,9 +98,6 @@ Section "" ;No components page, name is not important
SetOutPath $INSTDIR SetOutPath $INSTDIR
; Put file there ; Put file there
File daemon_mgm.exe
File NetMonInstaller.exe
File npf_mgm.exe
File rpcapd.exe File rpcapd.exe
File LICENSE File LICENSE
@@ -120,7 +118,7 @@ Section "" ;No components page, name is not important
WriteRegStr HKLM "Software\WinPcap" "" '"$INSTDIR"' WriteRegStr HKLM "Software\WinPcap" "" '"$INSTDIR"'
; Write the uninstall keys for Windows ; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" "DisplayName" "winpcap-nmap 3.1" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" "DisplayName" "winpcap-nmap 4.0"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" "NoRepair" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" "NoRepair" 1
@@ -135,9 +133,6 @@ Section "Uninstall"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\winpcap-nmap"
DeleteRegKey HKLM "Software\WinPcap" DeleteRegKey HKLM "Software\WinPcap"
Delete $INSTDIR\daemon_mgm.exe
Delete $INSTDIR\NetMonInstaller.exe
Delete $INSTDIR\npf_mgm.exe
Delete $INSTDIR\rpcapd.exe Delete $INSTDIR\rpcapd.exe
Delete $INSTDIR\LICENSE Delete $INSTDIR\LICENSE
Delete $INSTDIR\uninstall.exe Delete $INSTDIR\uninstall.exe

Binary file not shown.