PDA

View Full Version : Question about using wucheck.exe?



NewsArchive
09-20-2010, 12:21 AM
Hello All,

Just figured out how to use wucheck. I have to say, just when I think I
know most what SB can do, I discover something new! Anyway...

When wucheck does it's thing, how can I display a dialog saying something
like, "There is an update available for XXXXXXX. Click next to install the
update."

I've seen something like that done but I've never done it.

Thanks!

Donald Ridley

NewsArchive
09-20-2010, 12:21 AM
Don

Try something like this:

PF='wupdate.exe'
PP = Upper(ShortPath(ITCC.ProgPath & '\' & pF))
IF Exists(PP)
PP = '"' & ITCC.ProgPath & '\' & pF & '"'
RC = ITS.ITRun(PP,true,'/C /S',,True) !! Elevate
IF RC = 1
IF Message('There are new updates to the <Program Name> 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?',|
ICON:Question,|
Button:Yes+Button:No)=Button:Yes
ITS.ITRun(PP)
Halt()
END
ELSE
Message('No updates to download','No new
updates',ICON:Exclamation)
END
ELSE
IF Message('The Auto Update Program file could not be found in the
"' & ITCC.ProgPath & '" folder. ' &|
'Please download and install the latest build from
www.<your_name>.com ' &|
'||Do you want to go to our download page now?',|
'Automatic update program not found.',|
ICON:Question,|
BUTTON:Yes+BUTTON:No,BUTTON:Yes) = BUTTON:Yes
ITS.OpenUrl('http://www.<your_name>.com/download/sclinks.html')
END
END

Cheers
Kim

NewsArchive
09-20-2010, 12:22 AM
Donald,

Both wucheck.exe and wupdate.exe have those dialogs you refer to. You could use
command line arguments to alter their normal behavior.

For example, I use wupdate.exe /S. This will not tell the user that an update is
available, it downloads and executes it. I've also added some script behavior to
check if my program is running and if so, tell the user to save their work and
close it.

Loop
Set Variable %MYAPPACTIVE% to FUNCTION:Detect Active Application("MYAPP.EXE")
[File Name]
If %MYAPPACTIVE% Equals "1" Then
Display Message Box "The application is still running. Please save your
wor..." -- "MyApp is still running"

The update then proceeds normally and restarts the program when wupdate complets.

Run Program %_SB_INSTALLDIR%\MyApp.exe (Always Install) [Non-Elevated]

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-20-2010, 12:23 AM
Hey Russ,

Yeah, after I posted the question, I had time to sleep on it. I think I'm
going to use the silent method.

Thanks,
Don