Skip to content

Commit

Permalink
Added error message with user guide if elevation fails when trying to…
Browse files Browse the repository at this point in the history
… update
  • Loading branch information
Bioruebe committed Aug 2, 2018
1 parent de323c5 commit 2074cb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Binary file modified English.ini
Binary file not shown.
12 changes: 10 additions & 2 deletions UniExtract.au3
Original file line number Diff line number Diff line change
Expand Up @@ -4534,7 +4534,11 @@ Func CheckUpdate($silent = $UPDATEMSG_PROMPT, $bCheckInterval = False, $iMode =
$found = True
; $Because FFMPEG uses the same update message, we cannot use the %name constant here
If Prompt(48 + 4, 'UPDATE_PROMPT', CreateArray($name, $sVersion, $return, $aReturn[0] > 2? $aReturn[2]: ""), 0) Then
If Not ShellExecute(CanAccess(@ScriptDir)? $sUpdaterNoAdmin: $sUpdater, "/main") Then MsgBox($iTopmost + 16, $title, t('UPDATE_FAILED'))
If CanAccess(@ScriptDir) Then
If Not ShellExecute($sUpdaterNoAdmin, "/main") Then MsgBox($iTopmost + 16, $title, t('UPDATE_FAILED'))
Else
If Not ShellExecute($sUpdater, "/main") Then MsgBox($iTopmost + 16, $title, t('UPDATE_NOADMIN'))
EndIf
Exit
Else
; If the user does not want to install the main update, let's not bother him with more 'update found' messages
Expand All @@ -4548,7 +4552,10 @@ Func CheckUpdate($silent = $UPDATEMSG_PROMPT, $bCheckInterval = False, $iMode =
If CheckUpdateHelpers($aReturn) Then
$found = True
If Prompt(48 + 4, 'UPDATE_PROMPT', t('UPDATE_TERM_PROGRAM_FILES'), 0) Then
If Not CanAccess($bindir) Then Exit ShellExecute($sUpdater, "/helper")
If Not CanAccess($bindir) Then
If Not ShellExecute($sUpdater, "/helper") Then MsgBox($iTopmost + 16, $title, t('UPDATE_NOADMIN'))
Exit
EndIf
If Not _UpdateHelpers($aReturn) And Not $ret2 Then MsgBox($iTopmost + 16, $title, t('UPDATE_FAILED'))
EndIf
EndIf
Expand Down Expand Up @@ -4726,6 +4733,7 @@ Func _UpdateGetSize($sPath)
Return $iSize
EndFunc

; Compare file size and hash with the server value
Func _UpdateFileCompare($sPath, $a)
Local $iSize = _UpdateGetSize($sPath)

Expand Down
Binary file modified lang/German.ini
Binary file not shown.

0 comments on commit 2074cb8

Please sign in to comment.