cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
akirekadu
Level 3

Elevated mode only for a portion of installation process

Hi all-

InstallAnywhere newbie here. Searched user guild for keyword elevated, but found nothing.

Here's my problem. As part of the product installation, I need to register a service using "sc create...". This requires elevated privileges under Windows 2008. How do I elevate privileges only for this part of the installation?

I can't do entire installation under elevated mode because some of the files need to be copies as logged in user.


Thanks for your help...
Labels (1)
0 Kudos
(7) Replies
pv7721
Level 20

0 Kudos
akirekadu
Level 3

The wikipedia article did help me understand a few facts about UAC. Thanks.


Still wondering if there is a way in IA to elevate privileges as and when needed?
0 Kudos
pv7721
Level 20

Well the beginning of the paragraph says: "A program can request elevation in a number of different ways. One way for program developers is to add a requestedPrivileges section to an XML document, known as the manifest, that is then embedded into the application." So I guess it's up to the application to ask for the elevated privileges when run as a normal user...
0 Kudos
akirekadu
Level 3

Vlad,

Sorry about not providing better details of my situation.

At a high level, here's what the installation process looks like.

1. Ask for a bunch of inputs
2. Install an embedded 3rd party product (needs to happen in normal mode)
3. Install binaries, config files etc of our product (needs to happen in normal mode)
4. Install couple of .Net services. InstallAnywhere handles installing these services using built-in mechanism. No need to run "sc create...." command (can be normal mode or with elevated privileges... does not matter)
5. Install mogrel service (for a Ruby on Rails app) using "sc create....". Running sc command requires elevated privileges. At this stage in the installation process is when I need to switch to elevated mode. Using manifest file is not an option because it not my .exe that I would run at this point.

Hope that makes the situation a bit more clear.

We are thinking of creating a separate mini IA project that would do the service registration (step 5) in silent mode. For this mini installer we will set the property "Windows Vista Execution Level" to "Administrator". The main installer will call this mini installer when it reaches step 5.

At this point what I am wondering is this: Is there a way to deal with this situation without having to create an additional installer.

Thanks for trying to help us out!
0 Kudos
pv7721
Level 20

Having the installer elevate itself to the Administrator privileges is what seems to be best! And I wonder why wouldn't work if you do that for the main installer! I mean it is launched as a regular user and when it needs administrator privileges, it will use them. Have you tried that?
0 Kudos
akirekadu
Level 3

The main installer cannot be run in elevated privilege mode because the embedded 3rd party product needs to be installed as logged in user (or else we run into permission issues. This behavior is specific to Windows Server 2008).

The point I am trying to understand is does IA allow elevating the mode just for one operation selectively?
0 Kudos
pv7721
Level 20

akirekadu wrote:
The main installer cannot be run in elevated privilege mode because the embedded 3rd party product needs to be installed as logged in user (or else we run into permission issues. This behavior is specific to Windows Server 2008).

The point I am trying to understand is does IA allow elevating the mode just for one operation selectively?


Personally I don't think so... but only the support can answer this question for sure!
0 Kudos