File tree Expand file tree Collapse file tree 2 files changed +20
-19
lines changed
tooling/bundler/src/bundle/windows/templates Expand file tree Collapse file tree 2 files changed +20
-19
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' tauri-bundler ' : ' patch:bug'
3+ ---
4+
5+ On Windows, fix NSIS uninstaller failing to remove Start Menu shortcut if ` perMachine ` mode is used.
Original file line number Diff line number Diff line change @@ -344,16 +344,7 @@ FunctionEnd
344344 !include " {{this}}"
345345{{/each}}
346346
347- Var PassiveMode
348- Function .onInit
349- ${GetOptions} $CMDLINE " /P" $PassiveMode
350- IfErrors +2 0
351- StrCpy $PassiveMode 1
352-
353- !if " ${DISPLAYLANGUAGESELECTOR}" == " true"
354- !insertmacro MUI_LANGDLL_DISPLAY
355- !endif
356-
347+ !macro SetContext
357348 !if " ${INSTALLMODE}" == " currentUser"
358349 SetShellVarContext current
359350 !else if " ${INSTALLMODE}" == " perMachine"
@@ -369,6 +360,19 @@ Function .onInit
369360 SetRegView 32
370361 !endif
371362 ${EndIf}
363+ !macroend
364+
365+ Var PassiveMode
366+ Function .onInit
367+ ${GetOptions} $CMDLINE " /P" $PassiveMode
368+ IfErrors +2 0
369+ StrCpy $PassiveMode 1
370+
371+ !if " ${DISPLAYLANGUAGESELECTOR}" == " true"
372+ !insertmacro MUI_LANGDLL_DISPLAY
373+ !endif
374+
375+ !insertmacro SetContext
372376
373377 ${If} $INSTDIR == " "
374378 ; Set default install location
@@ -595,15 +599,7 @@ Function .onInstSuccess
595599FunctionEnd
596600
597601Function un.onInit
598- ${If} ${RunningX64}
599- !if " ${ARCH}" == " x64"
600- SetRegView 64
601- !else if " ${ARCH}" == " arm64"
602- SetRegView 64
603- !else
604- SetRegView 32
605- !endif
606- ${EndIf}
602+ !insertmacro SetContext
607603
608604 !if " ${INSTALLMODE}" == " both"
609605 !insertmacro MULTIUSER_UNINIT
You can’t perform that action at this time.
0 commit comments