-
Web Update program
Friedrich,
I've a client that on one machine, the wupdate.exe does not appear to run
anymore. This is the code I've placed in my app that calls it:
IF EXISTS(CLIP(GLOV:RootEXEPath) & '\wupdate.exe')
!If wupdate.exe exists, which it should
RUN(CLIP(GLOV:RootEXEPath) & '\wupdate.exe')
!Run it and it checks for updates
END
This works fine on other workstations and used to work on this one. If they
open the program location folder with Windows Explorer and double-click on
wupdate.exe, it then runs perfectly. The above also works perfectly on my
machine.
Any ideas?
--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm
-
Re: Web Update program
Russ,
>
> Any ideas?
>
It's not a good idea to use the RUN() command. The Clarion RUN() command is
a wrapper around the CreateProcess Windows API. CreateProcess will always
fail if a non-elevated application under Vista/2008/Win7 attempts to launch
another application whose manifest requires elevation. GetLastError will
return 740 (ERROR_ELEVATION_REQUIRED) in this case.
It's not a wupdate.exe problem but an issue with how you launch an
application.
Does this help?
Friedrich
-
Re: Web Update program
BTW, ShellExecuteEx is the way to go!
Here is a quick and dirty demo (for Clarion developers).
http://www.lindersoft.com/projects/ClarionShellExec.zip
Friedrich
-
Re: Web Update program
Thanks!
--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm
-
Re: Web Update program
Since wupdate always works except in one isolated case of how I called it, I never
lost faith in it <g>. I was just curious why this one workstation (Win7) suddenly
can't run it anymore from the RUN command. I figured it had something to do with
elevation and your reply strengthens that suspicion.
Do you have any theories why the sudden change? I've not changed anything in this
area of the program I quite some time. I don't even think I changed the
manifest - maybe <g>.
--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm
-
Re: Web Update program
> Since wupdate always works except in one isolated case of how I called it,
> I never lost faith in it <g>. I was just curious why this one workstation
> (Win7) suddenly can't run it anymore from the RUN command. I figured it
> had something to do with elevation and your reply strengthens that
> suspicion.
>
> Do you have any theories why the sudden change? I've not changed anything
> in this area of the program I quite some time. I don't even think I
> changed the manifest - maybe <g>.
Perhaps he played with his UAC level or launched your application elevated
(instead of non-elevated) in the past?
If 1.) UAC is enabled and 2.) your application is running non-elevated and
3.) tries to launch wupdate.exe (an application whose manifest requires
elevation) then CreateProcess will always fail on an UAC-aware operating
system (Vista, Windows 2008, Windows 7 and Windows 2008 R2).
BTW, you can also use the wucheck.exe client to "check for updates"
non-elevated and there is no elevation prompt on UAC-aware systems.
Friedrich
-
Re: Web Update program
Funny thing is that there is no indication of failure, no messages of any kind.
Its like a menu item that is merely defined - no code or procedure calls under it.
IOW - nothing happens.
>
> BTW, you can also use the wucheck.exe client to "check for updates" non-elevated
> and there is no elevation prompt on UAC-aware systems.
>
> Friedrich
>
--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm
-
Re: Web Update program
> Funny thing is that there is no indication of failure, no messages of any
> kind. Its like a menu item that is merely defined - no code or procedure
> calls under it. IOW - nothing happens.
Do you check the RUN error code? Windows will silently return Error 740 (it
will not display a message box) in this case and will not launch the
application at all!
Friedrich
-
Re: Web Update program
As you can see from my code, I'm missing the RunCode check. I'm adding it <g>
--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm
-
Re: Web Update program
>
> As you can see from my code, I'm missing the RunCode check. I'm adding it
> <g>
>
<G> And I bet you'll see error 740 after doing this :)
Friedrich