PDA

View Full Version : Using WUPDATE - How to get it started in vista/7 enviroment



NewsArchive
01-26-2010, 01:29 AM
Hi!
Well, perhaps this is more a Clarion than a setupbuilder question.
I try to start WUPDATE.EXE from my program - Uses good old Run or vuRun for
it.
At my developement machine, thats without any troubles.
At a customer, who runs 7 ultimate, nothing happens.
If i start it directly, it does what it is supposed to do - Of cause, but
asks for conformation from UAC.
So, question is, how to start it elevated?

Edvard Korsbęk

NewsArchive
01-26-2010, 01:30 AM
From a Clarion program, use ShellExecute (NOT Chain or Run!!)

Remember that you can also use wucheck.exe non-elevated to check whether an
update is available... then offer to run wupdate.exe if one is.

jf

NewsArchive
01-26-2010, 01:31 AM
Hi Edvard,

> Well, perhaps this is more a Clarion than a setupbuilder question.
> I try to start WUPDATE.EXE from my program - Uses good old Run or vuRun for
> it.
> At my developement machine, thats without any troubles.
> At a customer, who runs 7 ultimate, nothing happens.
> If i start it directly, it does what it is supposed to do - Of cause, but
> asks for conformation from UAC.
> So, question is, how to start it elevated?

The ITRun method in the ShellClass in our Utilities can force elevation of a
program that is manifested as "asInvoker". WUpdate should be manifested as
"RequireAdministrator" so it SHOULD elevate, but it will not if you are
using RUN(). ITRun fixes that too by using ShellExecuteEx. Here is an
example code that I use in Build Automator:

CheckforWebUpdates ROUTINE
Data
Rc Long
Ec Long
PP CString(2049)
pF CString(50)
Code
pF = 'autoupdate.exe'
PP = Upper(ShortPath(ITU.ProgPath & '\' & pF))
If Exists(PP)
PP = '"' & ITU.ProgPath & '\' & pF & '"'
RC = ITU.ITRun(PP,true,'/C /S',,True) !! Elevate
If RC = 1
If Message('There are new updates to the Build Automator program
available for download. ' &|
'If you want to update the program, the program will shut
down automatically and ' &|
'run the web update wizard.' &|
'||Do you want to update the program now?',|
'Updates Available - download now?',|
'~RO-Mx1_internet-america.ico',|
Button:Yes+Button:No)=Button:Yes
ITU.ITRun(PP)
Halt()
End
Else
Message('No updates to download for the Build Automator','No new
updates','~RO-Mx1_internet-america.ico')
End
Else
If Message('The AutoUpdate.EXE file could not be found in the "' &
ITU.ProgPath & '" folder. ' &|
'Please download and install the latest build from
www.buildautomator.com. ' &|
'||Do you want to go to our download page now?',|
'Automatic update program not found.',|
'~RO-Mx1_internet-america.ico',|
BUTTON:Yes+BUTTON:No,BUTTON:Yes) = BUTTON:Yes
ITU.OpenUrl('http://www.buildautomator.com/downloads.php')
End
End

Hope this helps:)

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

NewsArchive
01-26-2010, 01:32 AM
Edvard,

> So, question is, how to start it elevated?

For a technical explanation, see:
http://www.lindersoft.com/forums/showthread.php?p=28915#post28915

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows 7 installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner