+ Reply to Thread
Results 1 to 5 of 5

Thread: calling wupdate from our app

  1. #1

    Default calling wupdate from our app

    Hi,

    We're trying to add functionality to our application so as it will call the wupdate.exe file in silent mode upon the application starting.

    The code seems to be executing properly, and finding wupdate.exe correctly, but I get an error message saying "error 740: the requested operation requires elevation". Does wupdate require some sort of administrator privileges to run?

    I'm running Vista, by the way, if that makes a difference.

    Thanks,

    Andy

  2. #2
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: calling wupdate from our app

    Andy,

    This only happens if a non-elevated application tries to launch an application via CreateProcess on a UAC-aware Windows operating system (Windows Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2). The CreateProcess() Windows API will always fail if a non-elevated application attempts to launch another application whose manifest requires elevation. GetLastError will return 740 (ERROR_ELEVATION_REQUIRED) in this case.

    Use ShellExecuteEx and you are done.

    Does this help?

    Friedrich

  3. #3

    Default Re: calling wupdate from our app

    Yes, thanks Friedrich. We actually came across this solution ourselves. But I can confirm it's correct.

    One other issue though, do you know of any way to bypass the UAC dialog that asks for permission to continue, other than disabling UAC?

  4. #4
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: calling wupdate from our app

    Hi Andy,

    Perhaps the following is of interest

    http://www.lindersoft.com/forums/showthread.php?t=13819

    Friedrich

  5. #5

    Default Re: calling wupdate from our app

    I just got round to trying out the new wucheck functionality. It seems to work a treat!

    Thanks a lot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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