View Full Version : Launch non-elevated
NewsArchive
10-15-2010, 12:55 AM
Hi Friedrich,
Is this option in the "Run Program" action safe to run the updated program
after a web update under Vista/Win7 UAC? I.e. what I do in my program is
that if an update exists I launch the web update and terminate my program.
Question is if this option is safe to run my program at the end of the web
update?
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
10-15-2010, 12:55 AM
Hi Arnór,
> Is this option in the "Run Program" action safe to run the updated program
> after a web update under Vista/Win7 UAC? I.e. what I do in my program is
> that if an update exists I launch the web update and terminate my program.
> Question is if this option is safe to run my program at the end of the web
> update?
Yes, this option is safe! The "Launch non-elevated under UAC" Run option
lets you launch the updated application in the context of the "original"
Standard User. You can also use the option to start your app at the end of
an installation.
It is very common to start an application at the end of the installation.
If you do not use the "non-elevated" Run option, the application is often
started under the wrong user context because the elevated installer
privileges are carried over to that application. "Launch non-elevated under
UAC" solves this problem.
Friedrich
NewsArchive
10-15-2010, 12:55 AM
> It is very common to start an application at the end of the installation.
> If you do not use the "non-elevated" Run option, the application is often
> started under the wrong user context because the elevated installer
> privileges are carried over to that application. "Launch non-elevated under
> UAC" solves this problem.
Friedrich,
Does that still function as expected on a non-UAC OS (or if the user has
UAC disabled)?
Or do we need to test for the OS and/or UAC condition?
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - "Get ProPath, make your Clarion programs ready
for Windows 7 and Vista!"
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 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
10-15-2010, 02:17 AM
Hi Charles,
> Does that still function as expected on a non-UAC OS (or if the user has
> UAC disabled)?
>
> Or do we need to test for the OS and/or UAC condition?
The "non-elevated" option does not have any effect on non-UAC aware systems
or on systems that have UAC disabled.
We do the following in the SB install image to launch the IDE at the end of
the installation (see attached screenshot).
Friedrich
NewsArchive
10-15-2010, 02:18 AM
> The "non-elevated" option does not have any effect on non-UAC aware systems
> or on systems that have UAC disabled.
>
> We do the following in the SB install image to launch the IDE at the end of
> the installation (see attached screenshot).
Thanks for the clarification and example!
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - "Get ProPath, make your Clarion programs ready
for Windows 7 and Vista!"
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 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
10-15-2010, 02:18 AM
>
> Thanks for the clarification and example!
>
:-)
Friedrich
NewsArchive
10-16-2010, 08:07 AM
Hi Friedrich,
>> Or do we need to test for the OS and/or UAC condition?
>
> The "non-elevated" option does not have any effect on non-UAC aware systems
> or on systems that have UAC disabled.
>
> We do the following in the SB install image to launch the IDE at the end of
> the installation (see attached screenshot).
The code you show tests for Win_Vista. Does that mean that this does not
work if I install on Vista, W2k8 or Win7 with UAC disabled? Is there a
reason why SB doesn't simply handle this automatically so duplicated code is
not needed???
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
10-16-2010, 08:08 AM
Hi Arnór,
>> We do the following in the SB install image to launch the IDE at the end
>> of the installation (see attached screenshot).
>
> The code you show tests for Win_Vista. Does that mean that this does not
> work if I install on Vista, W2k8 or Win7 with UAC disabled? Is there a
> reason why SB doesn't simply handle this automatically so duplicated code
> is not needed???
It tests for "less than" Vista ;-) So it is only executed in "non-elevated
mode" if the operating system is UAC-aware.
But in fact, the conditional statement is not required because SetupBuilder
handles this automatically. The function will work on machines with UAC
disabled and a fallback mechanism kicks in if the operating system does not
support UAC.
Friedrich
NewsArchive
10-17-2010, 08:22 AM
Hi Friedrich,
> But in fact, the conditional statement is not required because SetupBuilder
> handles this automatically. The function will work on machines with UAC
> disabled and a fallback mechanism kicks in if the operating system does not
> support UAC.
Ok, so, let me get this straight<g>
I can just use:
Run Program %SB_InstallDir%\MyProgram.exe (Always Install) [Non-Elevated]
and not worry about if this is on Win98 or Win7?<g>
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
10-17-2010, 08:22 AM
Hi Arnór,
> Ok, so, let me get this straight<g>
>
> I can just use:
>
> Run Program %SB_InstallDir%\MyProgram.exe (Always Install) [Non-Elevated]
>
> and not worry about if this is on Win98 or Win7?<g>
Yes ;-) And it even works on Win95 <g> (I just tested it).
Friedrich
NewsArchive
10-18-2010, 02:19 AM
Hi Friedrich,
> Yes ;-) And it even works on Win95 <g> (I just tested it).
Excellent:)
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
10-19-2010, 08:41 AM
>
> Yes ;-) And it even works on Win95 <g> (I just tested it).
>
BTW, SetupBuilder 7.1 Build 2860 (February 02, 2010) incorporated the
following change:
----------------------------------------------------------------------------
CHANGE : Installer: The "Run elevated from non-elevated SetupBuilder
application" option in "Run Program..." is only executed on
Vista or better.
----------------------------------------------------------------------------
So my statement above is only valid for SB 7.1 #2860 and better.
Friedrich
NewsArchive
10-19-2010, 08:42 AM
Hi Friedrich,
> Question is if this option is safe to run my program at the end of the web
> update?
I have been testing installs all night on Windows 7 Ultimate with all the
latest updates. What I have found is that if I use this in a web update I
get an error after the program runs about "Explorer.exe" has stopped
working. As far as I can tell it ONLY happens when the program is executed
at the end of the web update. When I closed the program down after it was
run from the webupdate I would also get a window telling me that the program
did not run properly or something to that effect (sorry, didn't grab a
screenshot). That also happened _only_ when the program was run from the
web update, i.e. it never happens when I run the program from a shortcut on
the desktop or the start menu. Everything is code signed and all my
dll's/exe's are manifested asInvoker with Vista and Windows 7 compatibility.
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
10-19-2010, 08:43 AM
Hi Arnór,
I don't think this is caused by the "Launch non-elevated under UAC" option
(but of course, I can be wrong).
It seems to me that the webupdate self-removal process causes this in your
"Explorer.exe". Perhaps on of your protection software products "blocks"
it? I don't know.
What happens if you disable this "Launch non-elevated under UAC" option and
start it elevated from web update?
Because this option worked fine on (at least) 22 million installations on
UAC-aware systems during the last 15 months, I'll not open a ticket here.
It would be too dangerous to play with the code.
Friedrich
NewsArchive
10-22-2010, 02:03 AM
Hi Friedrich,
> It seems to me that the webupdate self-removal process causes this in your
> "Explorer.exe". Perhaps on of your protection software products "blocks"
> it? I don't know.
>
> What happens if you disable this "Launch non-elevated under UAC" option and
> start it elevated from web update?
If I get a chance this weekend I'll run some tests on this and will report
the results. There is no software protection on this system, it's just
plain vanilla Clarion 6.3 app, manifested for win7/vista compat. and code
signed. This is on a plain, default all the way, install of Windows 7
Ultimate, no bells or whistles that I'm aware of<g>
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
10-22-2010, 02:03 AM
Hi Arnór,
>> It seems to me that the webupdate self-removal process causes this in
>> your "Explorer.exe". Perhaps on of your protection software products
>> "blocks" it? I don't know.
>>
>> What happens if you disable this "Launch non-elevated under UAC" option
>> and start it elevated from web update?
>
> If I get a chance this weekend I'll run some tests on this and will report
> the results. There is no software protection on this system, it's just
> plain vanilla Clarion 6.3 app, manifested for win7/vista compat. and code
> signed. This is on a plain, default all the way, install of Windows 7
> Ultimate, no bells or whistles that I'm aware of<g>
<G>
Please try the following three things:
1. Disable the "Launch non-elevated under UAC" option and let Run Program
restart the program elevated.
If this still causes a Explorer.exe error:
2. Add a Sleep(5) to the end of your script (after the line that restarts
the application)
If this still causes a Explorer.exe error:
3. Disable the self-removal in your web update.
Thanks,
Friedrich
NewsArchive
10-22-2010, 02:04 AM
Hi Friedrich,
> 3. Disable the self-removal in your web update.
Thanks for the pointers:) How do I disable the self-removal?
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
10-22-2010, 02:04 AM
Hi Arnór,
>> 3. Disable the self-removal in your web update.
>
> Thanks for the pointers:) How do I disable the self-removal?
I think you have the following in your script:
! Always remove installer
Set Installer Flag $SB_ALWAYSREMOVEINSTALLER$ to "1"
-OR-
General Information Visualizer -> Advanced Settings -> "Remove Installer
after Successfull Installation".
Friedrich
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.