Skip to content

Commit b60c229

Browse files
committed
Merge pull request #2890 from getlantern/issue2802
Fixed registry from installer and windows and auto-start by default closes #2802
2 parents ccc92ce + 52cd701 commit b60c229

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

installer-resources/windows/lantern.nsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Section
8282
CreateShortCut "$DESKTOP\Lantern.lnk" "$INSTDIR\lantern.exe" "" "$INSTDIR\lantern.ico" 0
8383

8484
# This is a bad registry entry created by old Lantern versions.
85-
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Run\value"
85+
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "value"
8686

8787
# Add a registry key to set -clear-proxy-settings. See https://github.com/getlantern/lantern/issues/2776
8888
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" \
@@ -135,7 +135,7 @@ Section "uninstall"
135135
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Lantern"
136136

137137
# Don't run Lantern on startup.
138-
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Run\Lantern"
138+
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Lantern"
139139

140140
${nsProcess::Unload}
141141
SectionEnd

src/github.com/getlantern/flashlight/config/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/getlantern/appdir"
1919
"github.com/getlantern/fronted"
2020
"github.com/getlantern/golog"
21+
"github.com/getlantern/launcher"
2122
"github.com/getlantern/proxiedsites"
2223
"github.com/getlantern/yaml"
2324
"github.com/getlantern/yamlconf"
@@ -298,7 +299,8 @@ func (cfg *Config) applyClientDefaults() {
298299

299300
if cfg.AutoLaunch == nil {
300301
cfg.AutoLaunch = new(bool)
301-
*cfg.AutoLaunch = false
302+
*cfg.AutoLaunch = true
303+
launcher.CreateLaunchFile(*cfg.AutoLaunch)
302304
}
303305

304306
// Make sure all servers have a QOS and Weight configured

0 commit comments

Comments
 (0)