path: root/packaging
diff options
authorUlf Lamping <ulf.lamping@web.de>2005-07-25 17:56:19 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-07-25 17:56:19 +0000
commit1894f6a949674a2ff2e47421c0ed1b7d980339c0 (patch)
treebe497b426f89f9eb76c141e378d22ab468922fbd /packaging
parent4d666be4b8caddffd6feffb303135017f3435b5e (diff)
bugfix: default for NPF service was default on for NT and above, but it has to be off (secure default)
stop NPF service and set it back to "On demand" if user deselected the corresponding checkbox when upgrading from a previous Ethereal install, try to detect which choices of icons and alike was used last time, and set this as default (e.g. don't install desktop icon if I choose not to install last time) minor text changes svn path=/trunk/; revision=15055
Diffstat (limited to 'packaging')
3 files changed, 40 insertions, 10 deletions
diff --git a/packaging/nsis/AdditionalTasksPage.ini b/packaging/nsis/AdditionalTasksPage.ini
index c920ec09f1..6d853cc3c7 100644
--- a/packaging/nsis/AdditionalTasksPage.ini
+++ b/packaging/nsis/AdditionalTasksPage.ini
@@ -7,7 +7,7 @@ Left=0
-Text=Ethereal Shortcuts
+Text=Create Shortcuts
[Field 2]
diff --git a/packaging/nsis/WinPcapPage.ini b/packaging/nsis/WinPcapPage.ini
index 576a2daf74..850f53e46a 100644
--- a/packaging/nsis/WinPcapPage.ini
+++ b/packaging/nsis/WinPcapPage.ini
@@ -66,7 +66,7 @@ Left=10
-Text=Start Winpcap service "NPF" at startup
+Text=Start WinPcap service "NPF" at startup
[Field 9]
@@ -75,5 +75,5 @@ Left=20
-Text=(so users with restricted privileges can capture)
+Text=(so users without Administrator privileges can capture)
diff --git a/packaging/nsis/ethereal.nsi b/packaging/nsis/ethereal.nsi
index 8fbfe34302..e1d1e32ac3 100644
--- a/packaging/nsis/ethereal.nsi
+++ b/packaging/nsis/ethereal.nsi
@@ -43,8 +43,10 @@ OutFile "${DEST}-setup-${VERSION}.exe"
Icon "..\..\image\ethereal.ico"
UninstallIcon "..\..\image\ethereal.ico"
+; Uninstall stuff (NSIS 2.08: "\r\n" don't work here)
+!define MUI_UNCONFIRMPAGE_TEXT_TOP "The following Ethereal installation will be uninstalled. Click 'Next' to continue."
; Uninstall stuff (this text isn't used with the MODERN_UI!)
-UninstallText "This will uninstall Ethereal.\r\nBefore starting the uninstallation, make sure Ethereal is not running.\r\nClick 'Next' to continue."
+;UninstallText "This will uninstall Ethereal.\r\nBefore starting the uninstallation, make sure Ethereal is not running.\r\nClick 'Next' to continue."
XPStyle on
@@ -540,12 +542,14 @@ SecRequired_skip_Winpcap:
; Load Winpcap NPF service at startup (depending on additional tasks page)
ReadINIStr $0 "$PLUGINSDIR\WinPcapPage.ini" "Field 8" "State"
-StrCmp $0 "0" SecRequired_skip_WinpcapService
+StrCmp $0 "0" SecRequired_no_WinpcapService
WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\NPF" "Start" 2 ;set NPF to (SERVICE_AUTO_START)
-; we have to tell the installer, we need a reboot!
-;SetRebootFlag true
!insertmacro SERVICE "start" "NPF" ""
+Goto SecRequired_done_WinpcapService
+WriteRegDWORD HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\NPF" "Start" 3 ;set NPF to (SERVICE_DEMAND_START)
+!insertmacro SERVICE "stop" "NPF" ""
SectionEnd ; "Required"
@@ -1080,13 +1084,14 @@ lbl_winpcap_3+:
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If selected, the currently installed $WINPCAP_VERSION will be uninstalled first."
- ;Disable NPF service setting for Win OT and if Winpcap is not installed
+ ; Disable NPF service setting for Win OT
StrCmp $R0 '95' lbl_npf_disable
StrCmp $R0 '98' lbl_npf_disable
StrCmp $R0 'ME' lbl_npf_disable
ReadRegDWORD $NPF_START HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Services\NPF" "Start"
+ ; (Winpcap may not be installed already, so no regKey is no error here)
IfErrors lbl_npf_done ;RegKey not available, so do not set it
- IntCmp $NPF_START 2 0 lbl_npf_done
+ IntCmp $NPF_START 2 0 lbl_npf_done lbl_npf_done
WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 8" "State" "1"
Goto lbl_npf_done
@@ -1097,4 +1102,29 @@ lbl_npf_disable:
+ ; if Ethereal was previously installed, unselect previously not installed icons etc.
+ ; detect if Ethereal is already installed ->
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ethereal" "UninstallString"
+ IfErrors lbl_ethereal_notinstalled ;if RegKey is unavailable, Ethereal is not installed
+ ; only select Start Menu Group, if previously installed
+ ; (we use the "all users" start menu, so select it first)
+ SetShellVarContext all
+ IfFileExists "$SMPROGRAMS\Ethereal\Ethereal.lnk" lbl_have_startmenu
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" "0"
+ ; only select Desktop Icon, if previously installed
+ IfFileExists "$DESKTOP\Ethereal.lnk" lbl_have_desktopicon
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" "0"
+ ; only select Quick Launch Icon, if previously installed
+ IfFileExists "$QUICKLAUNCH\Ethereal.lnk" lbl_have_quicklaunchicon
+ WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" "0"