PDA

View Full Version : SetupBuilder questions



Andrew
10-20-2010, 01:15 PM
Hello.
I've got two questions:


1) When I update my app with web-deploy, it appears to set the install location back to the default, even if it was changed at initial install. How can I update to the folder where id my app installed

2) Is there a way to install my application(with setupBuilder) so it runs as an administrator.


Thanks, Andrew

linder
10-21-2010, 12:00 AM
Andrew,


1) When I update my app with web-deploy, it appears to set the install location back to the default, even if it was changed at initial install. How can I update to the folder where id my app installed

You have to set the default installation folder (in your web update) to the installation location of your already installed program. See attached "code snipped" screenshot.


2) Is there a way to install my application(with setupBuilder) so it runs as an administrator.

Well, you should not do this. Your application should request "asInvoker" privileges. Only system tools might need administrator execution level privileges. The correct way to handle this is to embed a manifest into your own .exe (this makes your application UAC- and Win7-aware). See "#embed UAC manifest..." compiler directive. If you set it to "requireAdministrator" then it will run elevated.

Another option is to use the "Set App Compatibility Mode..." script function and set the Privilege Level for your .exe. But again, you should not do this (it's very very bad practice).

Does this help?

Friedrich

Unregistered
10-21-2010, 10:17 AM
Friedrich


Hello Friedrich.
Thanks for your answer.

To my mind both of problems related to my decision refuse from webupdate project
Now i use one project for install\update. I just increment application version number

So by first question I see this fuction call at default web update script, but no at default web install. Can I do it without web udpate

Same the second question . I need Admin rights at UAC systems for my custom helper update processes(execute bat scritps), which manually update app with wupdate and rerun application

It seems to me that if I would use web update project, I won't have these problems. But now I try have one project for all goals..

What's your opinion.

Thanks, Andrew

linder
10-21-2010, 10:52 AM
Andrew,

IMO, you do not need any .bat file to do your update(s). SetupBuilder can handle this for you. The web update installer package runs (by default) elevated so you have full control over the machine(s). You can use all script functions in web update and web installs. BTW, the "Detect Previous Version" is not limited to web updates.

If you have any further questions, just let me know.

Friedrich