Skip to content

Commit

Permalink
Improved the appearance and text of the installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Dec 29, 2015
1 parent 500fd3b commit 88926d0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
25 changes: 16 additions & 9 deletions installer/NPcap-for-nmap.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ VIAddVersionKey /LANG=1033 "LegalCopyright" "Copyright 2015 Insecure.Com LLC, Nm

!define MUI_ABORTWARNING

;--------------------------------
;Logo

!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "logo.bmp"
!define MUI_HEADERIMAGE_UNBITMAP "logo.bmp"

;--------------------------------
;Pages

Expand Down Expand Up @@ -323,7 +330,7 @@ Function adminOnlyOptionsPage
WriteINIStr "$PLUGINSDIR\options_admin_only.ini" "Field 4" "State" 0
WriteINIStr "$PLUGINSDIR\options_admin_only.ini" "Field 4" "Flags" "DISABLED"
no_winpcap_exist:
!insertmacro MUI_HEADER_TEXT "Security and API Options" ""
!insertmacro MUI_HEADER_TEXT "Installation Options" "Please review the following options before installing Npcap ${VERSION}"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "options_admin_only.ini"
FunctionEnd

Expand Down Expand Up @@ -431,13 +438,13 @@ Function registerServiceAPI_win7
StrCmp $0 "0" register_win7_success register_win7_fail

register_win7_fail:
DetailPrint "Failed to create the npf service for Win7 and Win8"
DetailPrint "Failed to create the npf service for Win7, Win8 and Win10"
IfSilent register_win7_done register_win7_fail_messagebox
register_win7_fail_messagebox:
MessageBox MB_OK "Failed to create the npcap service for Win7 and Win8. Please try installing Npcap again, or use the official Npcap installer from www.nmap.org"
MessageBox MB_OK "Failed to create the npcap service for Win7, Win8 and Win10. Please try installing Npcap again, or use the official Npcap installer from www.nmap.org"
Goto register_win7_done
register_win7_success:
DetailPrint "The npf service for Win7 and Win8 was successfully created"
DetailPrint "The npf service for Win7, Win8 and Win10 was successfully created"
register_win7_done:
FunctionEnd

Expand All @@ -448,10 +455,10 @@ Function un.registerServiceAPI_win7
StrCmp $0 "0" unregister_win7_success unregister_win7_fail

unregister_win7_fail:
DetailPrint "Failed to delete the npf service for Win7 and Win8"
DetailPrint "Failed to delete the npf service for Win7, Win8 and Win10"
Goto unregister_win7_done
unregister_win7_success:
DetailPrint "The npf service for Win7 and Win8 was successfully deleted"
DetailPrint "The npf service for Win7, Win8 and Win10 was successfully deleted"
unregister_win7_done:
FunctionEnd

Expand Down Expand Up @@ -563,7 +570,7 @@ Section "WinPcap" SecWinPcap
${EndIf}

WriteUninstaller "$INSTDIR\uninstall.exe"
DetailPrint "Installing NDIS6.x x86 driver for Win7 and Win8"
DetailPrint "Installing NDIS6.x x86 driver for Win7, Win8 and Win10"
SetOutPath $SYSDIR\drivers
WriteRegStr HKLM "Software\Npcap" "" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NpcapInst" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
Expand Down Expand Up @@ -630,7 +637,7 @@ Section "WinPcap" SecWinPcap
${EndIf}

WriteUninstaller "$INSTDIR\uninstall.exe"
DetailPrint "Installing NDIS6.x x64 driver for Win7 and Win8"
DetailPrint "Installing NDIS6.x x64 driver for Win7, Win8 and Win10"
SetOutPath $SYSDIR\drivers
; disable Wow64FsRedirection
System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
Expand All @@ -645,7 +652,7 @@ Section "WinPcap" SecWinPcap
File win7_above\x64\NPcapHelper.exe
File x64\wpcap.dll ; x64 NT5/NT6 version
; install the 64-bit version of packet.dll into System32
; install the NT6.1 above version (for Win7 and Win8)
; install the NT6.1 above version (for Win7, Win8 and Win10)
${If} $winpcap_mode == "yes"
File win7_above_winpcap\x64\Packet.dll ; x64 NT6.1 and above version
${Else}
Expand Down
2 changes: 1 addition & 1 deletion installer/final.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Left=10
Right=-1
Top=10
Bottom=18
Text=NPcap has been installed on your computer.
Text=Npcap has been installed on your computer.
State=0

[Field 2]
Expand Down
Binary file added installer/logo.bmp
Binary file not shown.

0 comments on commit 88926d0

Please sign in to comment.