File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
tooling/bundler/src/bundle/windows Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri-bundler " : patch:bug
3+ ---
4+
5+ Fix NSIS installer runs the app as admin when using ` perMachine ` install mode
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ const NSIS_URL: &str =
3434#[ cfg( target_os = "windows" ) ]
3535const NSIS_SHA1 : & str = "057e83c7d82462ec394af76c87d06733605543d4" ;
3636const NSIS_TAURI_UTILS_URL : & str =
37- "https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.3 .0/nsis_tauri_utils.dll" ;
38- const NSIS_TAURI_UTILS_SHA1 : & str = "01E48D6429B48B640230C6CE8F257C84758943AA " ;
37+ "https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.4 .0/nsis_tauri_utils.dll" ;
38+ const NSIS_TAURI_UTILS_SHA1 : & str = "E0FC0951DEB0E5E741DF10328F95C7D6678AD3AA " ;
3939
4040#[ cfg( target_os = "windows" ) ]
4141const NSIS_REQUIRED_FILES : & [ & str ] = & [
Original file line number Diff line number Diff line change @@ -348,10 +348,15 @@ Var AppStartMenuFolder
348348!define MUI_FINISHPAGE_SHOWREADME_TEXT " $(createDesktop)"
349349!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateOrUpdateDesktopShortcut
350350; Show run app after installation.
351- !define MUI_FINISHPAGE_RUN " $INSTDIR\${MAINBINARYNAME}.exe"
351+ !define MUI_FINISHPAGE_RUN
352+ !define MUI_FINISHPAGE_RUN_FUNCTION RunMainBinary
352353!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
353354!insertmacro MUI_PAGE_FINISH
354355
356+ Function RunMainBinary
357+ nsis_tauri_utils::RunAsUser " $INSTDIR\${MAINBINARYNAME}.exe" " "
358+ FunctionEnd
359+
355360; Uninstaller Pages
356361; 1. Confirm uninstall page
357362Var DeleteAppDataCheckbox
@@ -617,7 +622,7 @@ Function .onInstSuccess
617622 ${GetOptions} $CMDLINE " /R" $R0
618623 ${IfNot} ${Errors}
619624 ${GetOptions} $CMDLINE " /ARGS" $R0
620- Exec ' "$INSTDIR\${MAINBINARYNAME}.exe" $R0'
625+ nsis_tauri_utils::RunAsUser " $INSTDIR\${MAINBINARYNAME}.exe" " $R0"
621626 ${EndIf}
622627 ${EndIf}
623628FunctionEnd
You can’t perform that action at this time.
0 commit comments