Simple run

Started by Rookie56, May 31, 2018, 06:53:12 AM

Previous topic - Next topic

Rookie56

In Windows 10, there is the command to trigger Windows Update Check for update as usoclient.exe startscan
I did simple run("usoclient.exe"," startscan") , I have error 1932 WinExec: Function Failed.
I also did
coms=environment("COMSPEC")
runhidewait(coms, "/c usoclient.exe startscan")  but it still does not work.
Please help

td

UsoClient.exe is a replacement for wuauclt on Windows 10.  It does not have a 32-bit version on 64-bit Windows so that is one reason it will not start by simply using the 32-bit Run function with the exe's name. 

If you had clicked on the More Error Info button that displayed on the error message dialog, you would have likely found that Run could not find the file 'UsoClient.exe'  It could not find it because of file redirection.  File redirection has been a part of 64-bit Windows for about 12 years so it is well understood and you can read more about it as it relates to WinBatch here:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/64-bit+File~Redirection.txt

Also keep in mind that UsoClient.exe does not have a UI.  MSFT doesn't seem too interested in documenting it either.  I haven't spent any time trying to learn much about what actually happens when it is executed other than it seems to kick off one or more background update services.  It requires elevated admin privileges, as well.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

Rookie56