diff --git a/installers/windows/console.nsi b/installers/windows/console.nsi index deb94b3b..3d79025a 100644 --- a/installers/windows/console.nsi +++ b/installers/windows/console.nsi @@ -329,13 +329,23 @@ Section "Console Application" SecApp SectionEnd Section "Start Menu Shortcuts" SecStartMenu + ; Use the machine-wide config seed under ProgramData. + SetShellVarContext all + StrCpy $0 "$APPDATA\device-management-toolkit\config.yml" + SetShellVarContext current + CreateDirectory "$SMPROGRAMS\Device Management Toolkit" - CreateShortcut "$SMPROGRAMS\Device Management Toolkit\Console.lnk" "$INSTDIR\console.exe" "--tray" + CreateShortcut "$SMPROGRAMS\Device Management Toolkit\Console.lnk" "$INSTDIR\console.exe" "--tray --config $\"$0$\"" CreateShortcut "$SMPROGRAMS\Device Management Toolkit\Uninstall Console.lnk" "$INSTDIR\Uninstall.exe" SectionEnd Section "Desktop Shortcut" SecDesktop - CreateShortcut "$DESKTOP\DMT Console.lnk" "$INSTDIR\console.exe" "--tray" + ; Use the machine-wide config seed under ProgramData. + SetShellVarContext all + StrCpy $0 "$APPDATA\device-management-toolkit\config.yml" + SetShellVarContext current + + CreateShortcut "$DESKTOP\DMT Console.lnk" "$INSTDIR\console.exe" "--tray --config $\"$0$\"" SectionEnd Section /o "Add to PATH" SecPath @@ -355,8 +365,13 @@ Section /o "Add to PATH" SecPath SectionEnd Section /o "Run at Startup (System Tray)" SecStartup + ; Use the machine-wide config seed under ProgramData. + SetShellVarContext all + StrCpy $0 "$APPDATA\device-management-toolkit\config.yml" + SetShellVarContext current + ; Add to HKLM Run key so it launches with --tray on login - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "DMTConsole" '"$INSTDIR\console.exe" --tray' + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "DMTConsole" '"$INSTDIR\console.exe" --tray --config "$0"' ; Record that we added startup entry WriteRegStr HKLM "Software\DeviceManagementToolkit\Console" "StartupInstalled" "1" diff --git a/services/console b/services/console index 9827f180..7b98ca45 160000 --- a/services/console +++ b/services/console @@ -1 +1 @@ -Subproject commit 9827f1807d419de476e26156408f337dd3846986 +Subproject commit 7b98ca450bf00c9cd1fd745a3afd9f93440c40c2