Results 1 to 9 of 9

Thread: wucheck and wupdate return -1

  1. #1

    Default wucheck and wupdate return -1

    Hi Friedrich,

    After updating a webupdate install to SB7 I'm getting both wupdate.exe and
    wucheck returning -1 when I run them from my program (using ShellExecEx,
    WaitforSingleObject and GetExitCodeProcess). However if I run wupdate.exe
    it tells me, correctly, that there is a newer update. Any ideas? It
    _could_ be my code but I have used this class without issues for years so I
    don't know why it would have an issue with this...

    Best regards,

    --
    Arnór Baldvinsson - Icetips Alta LLC
    Port Angeles, Washington
    www.icetips.com - www.buildautomator.com - www.altawebworks.com

    Icetips product subscriptions at http://www.icetips.com/subscribe.php

  2. #2

    Default Re: wucheck and wupdate return -1

    Hi Friedrich,

    > _could_ be my code but I have used this class without issues for years so I
    > don't know why it would have an issue with this...

    This is rather unsettling: My code, using shellexecuteex etc. returns -1
    but (clarion) Run() returns 1. Hmm... This will drive me nuts until I
    figure out why the heck this is happening<g>

    Best regards,

    --
    Arnór Baldvinsson - Icetips Alta LLC
    Port Angeles, Washington
    www.icetips.com - www.buildautomator.com - www.altawebworks.com

    Icetips product subscriptions at http://www.icetips.com/subscribe.php

  3. #3

    Default Re: wucheck and wupdate return -1

    Hi Friedrich,

    > This is rather unsettling: My code, using shellexecuteex etc. returns -1
    > but (clarion) Run() returns 1. Hmm... This will drive me nuts until I
    > figure out why the heck this is happening<g>

    Whew! Mystery solved! Run() will happily run "wucheck.exe" while
    ShellExecEx requires a full path to it to work properly. I normally always
    specify full path, but was lazy and thought this would work Apparently
    it's like wucheck/wupdate don't check for the current path in case the path
    is not part of the startup (or something) and can't find the app (which is
    correct since it is looking for "wucheck.exe" not "C:\path\wucheck.exe") in
    the registry and fails with -1 (which is also correct if the path is
    missing). Interesting!

    Best regards,

    --
    Arnór Baldvinsson - Icetips Alta LLC
    Port Angeles, Washington
    www.icetips.com - www.buildautomator.com - www.altawebworks.com

    Icetips product subscriptions at http://www.icetips.com/subscribe.php

  4. #4

    Default Re: wucheck and wupdate return -1

    Hi Arnór,

    wucheck/wupdate do check for the current path.

    The following line in the scripts handle it:

    Set Variable %TMPPATH% to FUNCTION:Get System Info(Installer Path Name)

    Friedrich

  5. #5

    Default Re: wucheck and wupdate return -1

    So what actually works correctly?

    I was using valutilities vuRun and getting a "1" returned every time -
    even though I created a batch file and wucheck is actually returning a "0"

    I tried result = ITRun(runCommand, 1, ,,0) and had the same problem.
    Do you have to separate the parameters from the command?

    Paul Macfarlane

  6. #6

    Default Re: wucheck and wupdate return -1

    Hi Paul,

    > I tried result = ITRun(runCommand, 1, ,,0) and had the same problem.
    > Do you have to separate the parameters from the command?

    Yes, with ITRun you must separate the parameters, the program parameter
    cannot contain any parameters to the program. See
    http://www.icetips.com/manuals/utili...shellclass.htm

    ITS.ITRun(ITS.ProgPath & '\wucheck.exe',True, '/C /S')

    This works 100%.

    ITS.ITRun('wucheck.exe',True, '/C /S')

    on the other hand may not work correctly as it seems to trigger wucheck.exe
    NOT to include the path to the app when looking for the app key in the
    registry EVEN if it is being run in the correct path, i.e. PATH() is equal
    to ITS.ProgPath.

    So, make sure that you include the program path when using ITRun.

    Best regards,


    --
    Arnór Baldvinsson - Icetips Alta LLC
    Port Angeles, Washington
    www.icetips.com - www.buildautomator.com - www.altawebworks.com

    Icetips product subscriptions at http://www.icetips.com/subscribe.php

  7. #7

    Default Re: wucheck and wupdate return -1

    Thank you !

    And doing.....

    Result = ITS.ITRun(ITS.ProgPath & '\wucheck.exe',True, '/C /S')

    Result (long) will be 0 (nothing new) or 1 (new version available)

    Correct?

    Paul Macfarlane

  8. #8

    Default Re: wucheck and wupdate return -1

    Hi Paul,

    > Result = ITS.ITRun(ITS.ProgPath & '\wucheck.exe',True, '/C /S')
    >
    > Result (long) will be 0 (nothing new) or 1 (new version available)
    >
    > Correct?

    Yes. ITRun uses GetExitCodeProcess API to get the exit code. This is only
    triggered if the WAIT flag is specified as otherwise there is no reliable
    exit code

    Best regards,

    --
    Arnór Baldvinsson - Icetips Alta LLC
    Port Angeles, Washington
    www.icetips.com - www.buildautomator.com - www.altawebworks.com

    Icetips product subscriptions at http://www.icetips.com/subscribe.php

  9. #9

    Default Re: wucheck and wupdate return -1

    Got it working. Thanks for the tips and clarification.

    Paul Macfarlane

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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