installer-debug: resolve %ProgramData% logs dir at runtime
This commit is contained in:
parent
fecc2ef201
commit
f40cd2a3c9
1 changed files with 7 additions and 3 deletions
|
|
@ -47,7 +47,11 @@ ShowUninstDetails show
|
|||
|
||||
!define PS '"$WINDIR\Sysnative\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass'
|
||||
|
||||
Var LogDir
|
||||
|
||||
Function .onInit
|
||||
ReadEnvStr $LogDir "ProgramData"
|
||||
StrCpy $LogDir "$LogDir\Verae\logs"
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${Else}
|
||||
|
|
@ -92,17 +96,17 @@ Section "Verae Print Stamp + printer" SecMain
|
|||
CreateShortCut "$SMPROGRAMS\Verae\Verae - Collect diagnostics.lnk" "$WINDIR\System32\WindowsPowerShell\v1.0\powershell.exe" '-NoProfile -ExecutionPolicy Bypass -NoExit -File "$INSTDIR\scripts\verae-diag.ps1"'
|
||||
CreateShortCut "$SMPROGRAMS\Verae\Verae - Setup signing key.lnk" "$INSTDIR\bin\verae-print.exe" "setup"
|
||||
CreateShortCut "$SMPROGRAMS\Verae\Verae - Start print helper.lnk" "$INSTDIR\bin\verae-printhelper.exe"
|
||||
CreateShortCut "$SMPROGRAMS\Verae\Verae - Logs folder.lnk" "$WINDIR\explorer.exe" '"$COMMONAPPDATA\Verae\logs"'
|
||||
CreateShortCut "$SMPROGRAMS\Verae\Verae - Logs folder.lnk" "$WINDIR\explorer.exe" '"$LogDir"'
|
||||
CreateShortCut "$SMPROGRAMS\Verae\Uninstall Verae Print Stamp (debug).lnk" "$INSTDIR\Uninstall.exe"
|
||||
|
||||
DetailPrint "Installing printer(s) — full transcript in $COMMONAPPDATA\Verae\logs"
|
||||
DetailPrint "Installing printer(s) — full transcript in $LogDir"
|
||||
nsExec::ExecToLog '${PS} -File "$INSTDIR\scripts\install-printer.ps1" -InstallDir "$INSTDIR"'
|
||||
Pop $0
|
||||
${If} $0 == "0"
|
||||
DetailPrint "Verae printer install: OK"
|
||||
${Else}
|
||||
DetailPrint "Verae printer install: FAILED (exit $0) — run Start menu > Verae > Collect diagnostics"
|
||||
MessageBox MB_ICONEXCLAMATION "Printer setup reported a problem (exit $0).$\r$\nLogs: $COMMONAPPDATA\Verae\logs$\r$\nPlease run Start > Verae > Collect diagnostics and send the zip from your Desktop."
|
||||
MessageBox MB_ICONEXCLAMATION "Printer setup reported a problem (exit $0).$\r$\nLogs: $LogDir$\r$\nPlease run Start > Verae > Collect diagnostics and send the zip from your Desktop."
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue