Browse Source

Add Windows registry entries during installation

The NSIS installer will now add Windows registry entries for
wpa_supplicant during installation and removes them during
uninstallation. This allows wpa_gui to start wpasvc and add new
interfaces without requiring the user to do any manual registry
editing.
Jouni Malinen 16 years ago
parent
commit
e40348080d
1 changed files with 15 additions and 0 deletions
  1. 15 0
      wpa_supplicant/wpa_supplicant.nsi

+ 15 - 0
wpa_supplicant/wpa_supplicant.nsi

@@ -39,6 +39,19 @@ section
 	File /opt/Qt-Win/files/QtCore4.dll
 	File /opt/Qt-Win/files/QtGui4.dll
 
+	WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_level" 0
+	WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_show_keys" 0
+	WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_timestamp" 0
+	WriteRegDWORD HKLM "Software\wpa_supplicant" "debug_use_file" 0
+
+	WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default" "ap_scan" 2
+	WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default" "update_config" 1
+	WriteRegDWORD HKLM "Software\wpa_supplicant\configs\default\networks" "dummy" 1
+	DeleteRegValue HKLM "Software\wpa_supplicant\configs\default\networks" "dummy"
+
+	WriteRegDWORD HKLM "Software\wpa_supplicant\interfaces" "dummy" 1
+	DeleteRegValue HKLM "Software\wpa_supplicant\interfaces" "dummy"
+
 	writeUninstaller "$INSTDIR\uninstall.exe"
 
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wpa_supplicant" \
@@ -66,6 +79,8 @@ section "uninstall"
 
 	ExecWait "$INSTDIR\wpasvc.exe unreg"
 
+	DeleteRegKey HKLM "Software\wpa_supplicant"
+
 	delete "$INSTDIR\wpa_gui.exe"
 	delete "$INSTDIR\wpa_cli.exe"
 	delete "$INSTDIR\COPYING"