Reply to Thread

Post a reply to the thread: wucheck return value in VB6

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 10-04-2010, 07:44 AM
    linder

    Re: wucheck return value in VB6

    Hello Wole,

    I have not written any VB code for more than 10 years now, so unfortunately, I do not have a good ShellExecute/Wait function for VB available.

    But the following link demonstrates how to use ShellExecuteEx and the "Wait" option:
    http://files.codes-sources.com/fichi...in.bas&lang=en

    Friedrich
  • 10-04-2010, 07:05 AM
    k4plus

    Re: wucheck return value in VB6

    Hi Friedrich,

    All my research confirms what you said but not being the hottest Windows API programmer around, I chose to do the following instead:

    1. Write a short function on the webserver than hosts my updates. This opens the 'program updates manifest file', reads the version information and returns whatever it finds; it literally took just 5 minutes to write this!
    2. Call that webserver 'api' from my desktop application using code that I already have written and tested that does http GETs and POSTs. This gives me the version number available.
    3. Check it against the version number of the currently running application, and voila, my very own, homegrown wucheck .
    4. If the programme needs updating and the user chooses to do so, I then simply shellexecute wupdate.exe to do the 'heavy lifting' and exit my app.

    Works for me and was easier to implement due to having code already available to do most of it anyway.

    Thanks for your help. I just thought to document the route I took in case it helps anyone else.

    Regards,


    Wole.
  • 09-25-2010, 03:19 AM
    linder

    Re: wucheck return value in VB6

    Wole,

    In Windows, if you use ShellExecuteEx, you have to "wait" for the launched application to retrieve the return value from that app. You have to use the WaitForSingleObject Windows API to wait and then GetExitCodeProcess to retrieve the exit code.

    BTW, this is not only for wupdate.exe or wucheck.exe. This is for all Windows applications.

    Does this help?

    Friedrich
  • 09-24-2010, 12:29 PM
    k4plus

    wucheck return value in VB6

    Hi,

    I can't seem to find an answer to this question anywhere...I'm using the shellexecute API to run wucheck from my VB6 program but I can't find a way to retrieve the return value that indicates whether there is a new version of my program available or not. The return value from shellexecute simply tells me whether it was able to run wucheck ok.

    Thanks for your help.

    Wole.

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •