Skip to content

Commit

Permalink
Do not add Npcap folder to PATH in Npcap mode any more.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Jun 15, 2016
1 parent 34cf16e commit 973d34d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions installer/NPcap-for-nmap.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SetCompressor /SOLID /FINAL lzma

!include "MUI.nsh"
!include "FileFunc.nsh"
!include "EnvVarUpdate.nsh"
; !include "EnvVarUpdate.nsh"
!include "LogicLib.nsh"
!include "FileFunc.nsh"

Expand Down Expand Up @@ -1109,36 +1109,36 @@ FunctionEnd
Function start_driver_service
${If} $winpcap_mode == "yes2"
${OrIf} $winpcap_mode == "yes"
ExecWait "net start npf"
nsExec::Exec "net start npf"
${EndIf}

${If} $winpcap_mode == "no"
${OrIf} $winpcap_mode == "yes"
ExecWait "net start npcap"
nsExec::Exec "net start npcap"
${EndIf}
FunctionEnd

Function stop_driver_service
${If} $winpcap_mode == "yes2"
${OrIf} $winpcap_mode == "yes"
ExecWait "net stop npf"
nsExec::Exec "net stop npf"
${EndIf}

${If} $winpcap_mode == "no"
${OrIf} $winpcap_mode == "yes"
ExecWait "net stop npcap"
nsExec::Exec "net stop npcap"
${EndIf}
FunctionEnd

Function un.stop_driver_service
${If} $winpcap_mode == "yes2"
${OrIf} $winpcap_mode == "yes"
ExecWait "net stop npf"
nsExec::Exec "net stop npf"
${EndIf}

${If} $winpcap_mode == "no"
${OrIf} $winpcap_mode == "yes"
ExecWait "net stop npcap"
nsExec::Exec "net stop npcap"
${EndIf}
FunctionEnd

Expand Down Expand Up @@ -1166,7 +1166,7 @@ Function set_driver_service_not_autostart
${EndIf}
FunctionEnd

Function write_env_var
/* Function write_env_var
${If} $winpcap_mode == "no"
${OrIf} $winpcap_mode == "yes"
ReadEnvStr $0 PATH
Expand Down Expand Up @@ -1196,7 +1196,7 @@ Function un.clear_env_var
DetailPrint "Removing DLL folder: $\"$SYSDIR\Npcap$\" from PATH environment variable"
${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$SYSDIR\Npcap"
${EndIf}
FunctionEnd
FunctionEnd */

;--------------------------------
; The stuff to install
Expand Down Expand Up @@ -1361,7 +1361,7 @@ npfdone:
${EndIf}

; add "C:\Windows\System32\Npcap" directory to PATH
Call write_env_var
; Call write_env_var

; write options to registry "service" key
Call write_registry_service_options
Expand Down Expand Up @@ -1446,7 +1446,7 @@ Section "Uninstall"
${EndIf}

; remove "C:\Windows\System32\Npcap" directory in PATH
Call un.clear_env_var
; Call un.clear_env_var

; Check windows version
Call un.checkWindowsVersion
Expand Down

0 comments on commit 973d34d

Please sign in to comment.