Wrong error message: A newer version is available

Wrong error message: A newer version is available

Postby Telli » 25.04.2016, 12:02

Its more a trap then an error, here the description:
When I tried to start UpdateGenerator.exe it ALLWAYS showed up the message "A newer version is available"
and did never proceed, even if I manually downloaded and installed the newest version.
(My fault was to try that from inside a file manager, which did not work properly.
As soon as I got the idea to start UpdateGenerator.exe directly from the Windows Command Prompt it worked normally)
So in my case the batch "CheckOUVersion.cmd" was not called,
which leads to $result=0 but @error<>0 instead
and so the following au3-line
"If $result = 0 Then $result = @error"
caused the wrong version error message to appear.

My SUGGESTION:
A SEPARATE ERROR MESSAGE for this case. See below:


Detail from your file "UpdateGenerator.au3"
...
Func RunVersionCheck($strproxy)
Dim $result

DisableGUI()
If $strproxy = "" Then
$result = RunWait(@ComSpec & " /D /C CheckOUVersion.cmd /exitonerror", @ScriptDir & "\cmd", @SW_SHOWMINNOACTIVE)
Else
$result = RunWait(@ComSpec & " /D /C CheckOUVersion.cmd /exitonerror /proxy " & $strproxy, @ScriptDir & "\cmd", @SW_SHOWMINNOACTIVE)
EndIf
If $result = 0 Then
$result = @error ;<******* PLEASE REPLACE BY AN SEPARATE ERROR MESSAGE if @error<>0 ***********
EndIf
If $result <> 0 Then
If ShowGUIInGerman() Then
$result = MsgBox(0x2023, "Versionsprüfung", "Sie setzen " & $caption & " ein. Eine neuere Version ist verfügbar." _
& @LF & "Möchten Sie WSUS Offline Update nun aktualisieren?")
Else
$result = MsgBox(0x2023, "Version check", "You are using " & $caption & ". A newer version is available." _
& @LF & "Would you like to update WSUS Offline Update now?")
EndIf
Telli
 

Re: Wrong error message: A newer version is available

Postby WSUSUpdateAdmin » 29.04.2016, 13:40

Hi!

Thanks, done. :)

Have a nice weekend!

Regards
T. Wittrock
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38


Return to Anregungen / Suggestions

Who is online

Users browsing this forum: No registered users and 40 guests