PDA

View Full Version : WUPDATE stops working on one location



NewsArchive
04-22-2010, 01:23 AM
In my newest program, I have added Wupdate, and as I am on version .102 now,
it has been a succesfull idea.
On one location, the updates has stopped at version .95.
When I execute wupdate, it just claims that there is no newer version
available.

Code is (Arnor Baldwinson will recognize it!)
As you will find, WUPDATE.EXE is run Elevated.
Server 2008

What to look for?

Edvard Korsbæk


CheckForUpdates ROUTINE
Data

RC LONG
PP CString(2049)
pF CString(50)

MessageText CSTRING(255)
DownLoadMessage CSTRING(255)
Code
pF = 'wupdate.exe'
PP = VuCurrentPath()&'\'&clip(pf)
If Exists(PP)
!vurun(pp,1,0)
RC = ITU.ITRun(PP,true,'/C /S',,True)
IF RC = 1
DownLoadMessage = Translator.BTStr('There is a newer version
available. Do you want to update the programme now?')
CASE Message(DownLoadMessage,Translator.BTStr('Check for
updates'),Icon:Question,'Nej|Ja')
OF 2
Messagetext = Translator.BTStr('The program will be shut down
meanwhile we update the programme.')
Message(Messagetext,Translator.BTStr('Check for updates'))
RC = ITU.ITRun(PP,true,,,True)
CleanCloseDown()
END
ELSE
DownLoadMessage = Translator.BTStr('There are no updates available')
Message(DownLoadMessage)
END
Else
Message(Translator.BTStr('The upgrade program could not be found. Please
contact support.'),Translator.BTStr('Check for updates'))
End

NewsArchive
04-22-2010, 01:24 AM
Hi Edvard,

>
> What to look for?
>

As I understand it, you do not check for error return codes. I assume your
program reports 'There are no updates available' (from your ELSE statement
if RC is <> 0) but in fact, it returned an error code. I would suggest to
see what error code is reported. You are running wupdate.exe in silent mode
so no message box is displayed if an error occurred. So in this case, you
have to use the returned error code to find out what causes this.

Does this help?

Friedrich