View Full Version : Web update puzzle
NewsArchive
12-21-2008, 01:14 PM
I have worked through the docs and the messages here but I'm still a bit
unclear on the exact sequence for a web update.
Is this correct:
1) I compile a WUPDATE.EXE using the sb6 script
2) I use RUN('WUPDATE.EXE') in my main app
3) This downloads the installer EXE from the web (which then autoruns I
think)
At some point I think I must exit my main app so that the installer can
overwrite the EXE which is still in use?? (as far as Windows is concerned)
regards
Mike
NewsArchive
12-21-2008, 01:14 PM
Hi Mike,
> I have worked through the docs and the messages here but I'm still a bit
> unclear on the exact sequence for a web update.
>
> Is this correct:
>
> 1) I compile a WUPDATE.EXE using the sb6 script
You "compile" a WUPDATE.EXE only if you have developed your own "custom"
wupdate.exe web update client. Otherwise, you use the "standard"
wupdate.exe.
> 2) I use RUN('WUPDATE.EXE') in my main app
I would *not* use RUN(). The Clarion "RUN" command makes use of the
CreateProcess() Windows API. But 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.
I would suggest to use ShellExecute instead.
Please see:
http://www.lindersoft.com:80/forums/showthread.php?p=18902
> 3) This downloads the installer EXE from the web (which then autoruns I
> think)
Yes, the wupdate.exe web update client downloads and executes the "real" web
update installation package if there is a new version available.
> At some point I think I must exit my main app so that the installer can
> overwrite the EXE which is still in use?? (as far as Windows is
> concerned)
Yes. There are different functions available to handle this.
For example:
http://www.lindersoft.com/forums/showthread.php?p=10385
BTW, I think this is an interesting demo:
http://www.lindersoft.com/forums/showthread.php?t=9459
Does this help?
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
12-21-2008, 01:15 PM
Thanks - I'll follow up those links.
One other thing, I thing there is a section missing from the help file - a
list and explanation of the WUPDATE.EXE command line switches. I can see
them for installer and compiler but not the wupdate exe.
regards
Mike
NewsArchive
12-21-2008, 01:16 PM
Hi Mike,
> Thanks - I'll follow up those links.
>
> One other thing, I thing there is a section missing from the help file - a
> list and explanation of the WUPDATE.EXE command line switches. I can see
> them for installer and compiler but not the wupdate exe.
wupdate.exe is a native compiled SetupBuilder installer. So all installer
command line switches are also available in wupdate.exe ;-)
BTW, the wupdate.sb6 source code is located in \Redist\1033
The /C wupdate.exe command line switch is not documented because it was an
experimental switch (handled from within the wupdate.sb6 script). But it
works without any problem so you can use it (/C ony checks if an update is
available or not).
Hope this helps.
Friedrich
NewsArchive
12-21-2008, 01:16 PM
friedrich, while you are here ...
i have a need to configure client setup for possible 2 web sites, primary and
secondary site.
for some reasons, with some client, the primary web adress is "unreachable" sometimes,
and their operation is time critical.
so there is reserve web site (duplicated, completely with other host provider)
the question is: how would you suggest to handle this scenario with wupdate?
thanks
Darko
NewsArchive
12-21-2008, 01:17 PM
Darko,
> friedrich, while you are here ...
> i have a need to configure client setup for possible 2 web sites,
> primary and secondary site.
> for some reasons, with some client, the primary web adress is
> "unreachable" sometimes, and their operation is time critical.
> so there is reserve web site (duplicated, completely with other host
> provider) the question is: how would you suggest to handle this
> scenario with wupdate?
I have to give it some thoughts...
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
12-21-2008, 01:23 PM
Hi Mike,
> Is this correct:
>
> 1) I compile a WUPDATE.EXE using the sb6 script
> 2) I use RUN('WUPDATE.EXE') in my main app
> 3) This downloads the installer EXE from the web (which then autoruns I
> think)
>
> At some point I think I must exit my main app so that the installer can
> overwrite the EXE which is still in use?? (as far as Windows is concerned)
Yes. What I do is I first call WUpdate.exe to check if there is an update.
If there is one, I start the wupdate.exe again and terminate the
application. Also make sure you use ShellExecuteEx in your app so that it
can elevate the weupdate.exe if it's running on vista - if you use RUN() the
wupdate.exe simply doesn't run.
This is code that I use in my 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
You might also want to check out this blog:
http://www.icetips.com/blog/index.php/2008/11/11/run-programs-elevated-on-vista
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
12-22-2008, 02:20 AM
> Yes. What I do is I first call WUpdate.exe to check if there is an update.
> If there is one, I start the wupdate.exe again and terminate the
> application.
I do my web updates differently.
I check in the web update script itself (not WUPDATE.EXE) to see if the
program is still running. Then I advise the user to close the app, click
OK and I check again (see attached).
Just put it in early in the script so that it goes off before the Loop
Wizard.
This method makes sure that you don't get a failed update because the app
is still running.
You can use the same logic and detect a service is running and shut it down
with the SB script methods too.
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-22-2008, 02:21 AM
Hi Charles,
> I check in the web update script itself (not WUPDATE.EXE) to see if the
> program is still running. Then I advise the user to close the app, click
> OK and I check again (see attached).
That would require interaction from the user to close the app. The way I do
it, the app closes itself immediately after calling the web update if there
is an update.
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
12-22-2008, 02:21 AM
>> I check in the web update script itself (not WUPDATE.EXE) to see if the
>> program is still running. Then I advise the user to close the app, click
>> OK and I check again (see attached).
>
> That would require interaction from the user to close the app. The way I do
> it, the app closes itself immediately after calling the web update if there
> is an update.
True, but if the user happens to say "Gee what happened to my program?" and
restarts it before the web update is complete, then the update would fail
for files in use.
I like your idea though - perhaps the best solution is to use BOTH<g>.
BTW - what do you do in regards to calling the check for update silently if
there is a proxy server involved?
RC = ITU.ITRun(PP,true,'/C /S',,True) !! Elevate
I've never tested it that way - does it fail to check (or return valid
info) or is the user presented with the Proxy screen of the regular web
update client?
That is one reason I always call the check for updates normally and let the
user step through the proxy screen.
Also unless the proxy screen pops up on it's own, how would the user ever
enter proxy data?
Inquiring minds want to know<g>
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-22-2008, 02:26 AM
Hi Charles,
> True, but if the user happens to say "Gee what happened to my program?" and
> restarts it before the web update is complete, then the update would fail
> for files in use.
See the code I posted:
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
If the user clicks the yes button, indicating that they want to update, the
webupdate starts and the program is terminated. So there is user
interaction to start the actual update and the visual process is pretty
obvious - the webupdate screen pops up and the program disappears<g>
Besides I say "If you want to update the program, the program will shut down
automatically and run the web update wizard"
> BTW - what do you do in regards to calling the check for update silently if
> there is a proxy server involved?
Don't know<g>
FRIEDRICH!!!;)
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
12-22-2008, 02:31 AM
> See the code I posted:
Ah - missed the details...
>> BTW - what do you do in regards to calling the check for update silently if
>> there is a proxy server involved?
>
> Don't know<g>
>
> FRIEDRICH!!!;)
Yes - inquiring minds want to know<g>.
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-22-2008, 02:32 AM
>>> BTW - what do you do in regards to calling the check for update silently
>>> if there is a proxy server involved?
>>
>> Don't know<g>
>>
>> FRIEDRICH!!!;)
>
> Yes - inquiring minds want to know<g>.
Well, this is a VERY GOOD question. The "Web Update" dialog retrieves the
proxy information. If this dialog is not displayed (in a silent check),
then I assume that it does not read the information.
An easy solution could be to use the "Read Proxy Server Info File..." script
function.
I'll do some tests after I have released the SB6 maintenance build that
enables support for Clarion 7 template registration.
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
12-22-2008, 02:33 AM
>>>> BTW - what do you do in regards to calling the check for update silently
>>>> if there is a proxy server involved?
>
> Well, this is a VERY GOOD question. The "Web Update" dialog retrieves the
> proxy information. If this dialog is not displayed (in a silent check),
> then I assume that it does not read the information.
>
> An easy solution could be to use the "Read Proxy Server Info File..." script
> function.
>
> I'll do some tests after I have released the SB6 maintenance build that
> enables support for Clarion 7 template registration.
Thanks Friedrich!
I've meant to ask about that before (in all my spare time<g>) but that is
why I always avoided using the silent check mode.
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-22-2008, 02:34 AM
>> I'll do some tests after I have released the SB6 maintenance build that
>> enables support for Clarion 7 template registration.
>
> Thanks Friedrich!
>
> I've meant to ask about that before (in all my spare time<g>) but that is
> why I always avoided using the silent check mode.
;-) I think we can easily work around this by using "Read Proxy Server Info
File...".
We can check if wupdate.ini is located in the wupdate.exe folder. If this
is the case, we use "Read Proxy Server Info File..." to read the proxy
information and wupdate.exe connects through a proxy even if it is running
in silent mode.
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
12-23-2008, 02:48 AM
One question, sort of connected to the subject:
To use webupdate, do you need your own server or is it possible to use a
standard web hotel ? (I use Surftown, and let them handle all the
maintaniance)
--
Kind regards / Med Venlig Hilsen
Viggo Poulsen
Vipilon ApS
www.vipilon.dk www.vipilon.com
NewsArchive
12-23-2008, 02:48 AM
Hi Viggo,
> One question, sort of connected to the subject:
> To use webupdate, do you need your own server or is it possible to use
> a standard web hotel ? (I use Surftown, and let them handle all the
> maintaniance)
The SetupBuilder iDeploy technology works using any type of HTTP server to
store the installation data. Therefore your server can run on Windows, or
it can run on Linux, Unix, Mac OS, or other operating systems. The
requirement is that it supports HTTP/1.0, or HTTP/1.1. iDeploy works
correctly with a wide variety of firewalls and proxy servers.
As I understand it, Surftown supports this and so you should be able to use
Web Update and Web Install without any problem.
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
12-23-2008, 02:49 AM
Hi Friedrich
Where is "Jane's article" on using ShellExecute?
Sim
~~~~~~~~~~~~~~~~~~~~~~~~~
NewsArchive
12-23-2008, 02:50 AM
Sim,
>
> Where is "Jane's article" on using ShellExecute?
>
http://www.clarionmag.com/cmag/v9/v9n04vista2b.html
And check this:
http://www.lindersoft.com/forums/showthread.php?t=10735
http://www.lindersoft.com/forums/showthread.php?p=18902
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
12-23-2008, 02:50 AM
Thanks, Friedrich.
Sim
~~~~~~~~~~~~~~~~~~~~~~~
NewsArchive
12-23-2008, 02:51 AM
> ;-) I think we can easily work around this by using "Read Proxy Server Info
> File...".
>
> We can check if wupdate.ini is located in the wupdate.exe folder. If this
> is the case, we use "Read Proxy Server Info File..." to read the proxy
> information and wupdate.exe connects through a proxy even if it is running
> in silent mode.
Ok, a few related questions...
1) If the program is set to use the check for updates in silent mode and it
fails because there is no proxy information in the wupdate.ini file, would
the user ever know - or is it a silent fail?
2) Is the INI file created when the wupdate.exe is ran in manual mode and
the user completes the proxy info?
3) If so, will wupdate.exe automatically run elevated so that a write to
the wupdate.ini file does not end up virtualized on Vista?
If all of the above is true, it almost seems like the first time that a
user runs the check for updates it should NOT be in silent mode.
IOW the first time it runs normal, then the developer writes a registry or
INI entry and only after that runs it in silent mode.
What do you think?
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-23-2008, 02:51 AM
Hi Charles,
> Ok, a few related questions...
>
> 1) If the program is set to use the check for updates in silent mode and
> it fails because there is no proxy information in the wupdate.ini file,
> would the user ever know - or is it a silent fail?
In this case, wupdate.exe will return a connection error (e.g. -4).
> 2) Is the INI file created when the wupdate.exe is ran in manual mode and
> the user completes the proxy info?
You can let wupdate.exe create the WUPDATE.INI (if the wupdate.exe user
enables the "I access the Internet with a proxy server" option then the
configuration settings are stored). Or you can create/modify that INI from
your own application (that is what the SetupBuilder IDE is doing).
> 3) If so, will wupdate.exe automatically run elevated so that a write to
> the wupdate.ini file does not end up virtualized on Vista?
Yes, wupdate.exe always runs elevated.
> If all of the above is true, it almost seems like the first time that a
> user runs the check for updates it should NOT be in silent mode.
If your own application allows to configure the proxy settings then running
the wupdate.exe in silent mode is no problem.
Friedrich
NewsArchive
12-23-2008, 02:52 AM
>> 1) If the program is set to use the check for updates in silent mode and
>> it fails because there is no proxy information in the wupdate.ini file,
>> would the user ever know - or is it a silent fail?
>
> In this case, wupdate.exe will return a connection error (e.g. -4).
Ok - thanks
>> 2) Is the INI file created when the wupdate.exe is ran in manual mode and
>> the user completes the proxy info?
>
> You can let wupdate.exe create the WUPDATE.INI (if the wupdate.exe user
> enables the "I access the Internet with a proxy server" option then the
> configuration settings are stored). Or you can create/modify that INI from
> your own application (that is what the SetupBuilder IDE is doing).
Ok.
>> 3) If so, will wupdate.exe automatically run elevated so that a write to
>> the wupdate.ini file does not end up virtualized on Vista?
>
> Yes, wupdate.exe always runs elevated.
I thought that was the case.
>> If all of the above is true, it almost seems like the first time that a
>> user runs the check for updates it should NOT be in silent mode.
>
> If your own application allows to configure the proxy settings then running
> the wupdate.exe in silent mode is no problem.
That would create a problem though if the app itself (non-elevated) was
trying to create the wupdate.ini file in the program files folder - right?
I see a "Catch 22" here<g> for most "normal" apps<g>
However perhaps a small SB app to gather (and save) the proxy data that
runs elevated could be called from the app menu is the right answer here.
What do you think?
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-23-2008, 02:52 AM
Hi Charles,
>>> If all of the above is true, it almost seems like the first time that
>>> a user runs the check for updates it should NOT be in silent mode.
>>
>> If your own application allows to configure the proxy settings then
>> running the wupdate.exe in silent mode is no problem.
>
> That would create a problem though if the app itself (non-elevated) was
> trying to create the wupdate.ini file in the program files folder - right?
>
> I see a "Catch 22" here<g> for most "normal" apps<g>
>
> However perhaps a small SB app to gather (and save) the proxy data that
> runs elevated could be called from the app menu is the right answer here.
>
> What do you think?
Yes, you are absolutely right. If the main application is not running
elevated then it's not possible to create/write WUPDATE.INI if it is located
in a protected folder (e.g. "Program Files" under Vista).
Another solution would be to create the WUPDATE.INI directly from the
installer. I'll add a demo to the SetupBuilder 7 Examples package. You can
create a simple custom dialog to gather the information we need for the
proxy thing.
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
12-23-2008, 02:53 AM
> Yes, you are absolutely right. If the main application is not running
> elevated then it's not possible to create/write WUPDATE.INI if it is located
> in a protected folder (e.g. "Program Files" under Vista).
LOL - see, I HAVE been "living in a Vista world" for too long now<g>.
> Another solution would be to create the WUPDATE.INI directly from the
> installer. I'll add a demo to the SetupBuilder 7 Examples package. You can
> create a simple custom dialog to gather the information we need for the
> proxy thing.
Cool.
That would work of course (but it does add one more layer of complexity to
the installer onion). I tend to lean towards the "don't ask me to make too
many decisions during the install" mode of operation (especially if the
customer is demoing the software).
I'm thinking that another option might be a "First Run" dialog in the main
app (the first time the check for updates is ran) that asks the user if
they use a proxy server. Then if the answer is yes the developer could
ShellExecute the wupdate.exe in manual mode. The wupdate.exe would create
the INI file.
Then the developer could use a HKCU Registry entry to store a setting to
check silently the next time (or even make that a user option).
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-23-2008, 02:54 AM
Hi Charles,
> That would create a problem though if the app itself (non-elevated) was
> trying to create the wupdate.ini file in the program files folder - right?
You could create a small exe that just created the ini. Codesign it with
requireAdministrator or force elevation at startup (use ShellExecuteEx verb
"runas" or Utilities - ITshellclass.ITRun)
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
12-23-2008, 02:55 AM
> You could create a small exe that just created the ini. Codesign it with
> requireAdministrator or force elevation at startup (use ShellExecuteEx verb
> "runas" or Utilities - ITshellclass.ITRun)
Your talking about a exe that contains the dialogs needed to acquire the
information and create the INI - right? Otherwise it would still not have
the needed information in it (and the user might not have the rights to set
it later).
All things being equal I'm leaning towards a Clarion dialog that asks the
user if they use a Proxy Server (the first time they check for updates).
If no, then the silent check is ran. If so, then the normal check is ran.
Afterwards I check that the INI exists and save a Registry Entry as to if
they want to run interactive or silent.
Then on subsequent runs I know which way to go with it.
Like most things Vista related - it appears there is no easy answer<g>.
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-23-2008, 02:55 AM
Hi Charles
> Your talking about a exe that contains the dialogs needed to acquire the
> information and create the INI - right? Otherwise it would still not have
> the needed information in it (and the user might not have the rights to set
> it later).
You talked about writing to ini and since it's in the program folder, you
wouldn't be able to unless the program was elevated. I'm just saying that
if you need something to be elevated to do something, an additional exe that
you can elevate from your main app may be an option. You can have a single
EXE to accomplish multiple tasks by telling it what to do via the command
line. This can be handy to make advanced user updates that may require
administrator privileges, such as writing to an ini file in program files or
update HKLM, etc.:)
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
NewsArchive
12-23-2008, 02:56 AM
> You talked about writing to ini and since it's in the program folder, you
> wouldn't be able to unless the program was elevated. I'm just saying that
> if you need something to be elevated to do something, an additional exe that
> you can elevate from your main app may be an option. You can have a single
> EXE to accomplish multiple tasks by telling it what to do via the command
> line. This can be handy to make advanced user updates that may require
> administrator privileges, such as writing to an ini file in program files or
> update HKLM, etc.:)
That is pretty much what I do with the config exe for PageSnip.
It is actually a small SetupBuilder EXE and is driven from command line
options. Then I call it to do different things from within the app (and
also as a "post installer" from the primary install.
The cool thing is that it was dead simple to do with SetupBuilder, it is
tiny (much more so than any Clarion exe) and it presents the user with the
same interface to "reconfigure" something in the system as they experienced
to "configure" it in the initial install.
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-23-2008, 02:56 AM
Hi Charles,
> It is actually a small SetupBuilder EXE and is driven from command line
> options. Then I call it to do different things from within the app (and
> also as a "post installer" from the primary install.
I have a couple of those too;)
Best regards,
--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.