PDA

View Full Version : AlwaysInstallElevated



Neelesh Korade
10-17-2003, 02:44 PM
Some questions on install privileges.
1) Does installing with elevated privileges mean the same thing as installing with administrator privileges

2) WI help says AlwaysInstallElevated policy for both user and machine have to be set to true for installing a package with elevated privileges. From where do I set this iin the registry? I guess I should do it from my bootstrapping application before launching the installation package. But if it is so, will I have to reset the AlwaysInstallElevated policy after launching the installation as I don't want to change the system policy permanently?

thanks
Neelesh

huntant
10-20-2003, 08:11 AM
1) Sort of. It means that the install will be elevated to run under the same account that it was installed with.

2) Those policies only need to be set if you need to have non-admins run the installs. My install requires that it is installed with administrative privileges, that way when patches are distributed, or run in maintenance mode and a non-admin is logged in, the install will be elevated to allow the process to succeed.




Anthony

Neelesh Korade
10-20-2003, 08:55 AM
Hi Anthony,
thanks a lot, it has cleared some of the confusion. Could you please help me more on this. How have you achieved "install with admin privileges" for your ionstaller? and also the following questions

1) From where do I set AlwaysInstallElevated policy in the registry? From my bootstrapping application before launching the installation package?

2) But if it is so, will I have to reset the AlwaysInstallElevated policy after launching the installation as I don't want to change the system policy permanently?


thanks
Neelesh

huntant
10-20-2003, 09:10 AM
What do you mean by "achieved install with admin privileges"?

1) Search for AlwaysInstallElevated in the windows installer help, this will show you the locations in the registry.

2) If a non-admin is running your bootstrap application, they will be unable to access the HKLM setting on Win2000 and higher. Your best bet is to not worry about the settings and require that it is installed using admin priviledges.



Anthony

Neelesh Korade
10-20-2003, 09:24 AM
Hi Anthonly,
In your earlier response to this question, in point number 2) you had said this
"My install requires that it is installed with administrative privileges, that way when patches are distributed, or run in maintenance mode and a non-admin is logged in, the install will be elevated to allow the process to succeed."

So I wanted to know how have you achieved install with admin privileges when non-admins run it.
The installer I am writing does some changes to the system which require admin privileges, but it will be installed remotely through a distribution tool. So the person logged in on the machine could well be a normal user. So I need to use this elavated install facility.

InstallShield help gives three alternatives for this, out of which one is to advertise the product for per machine installations. WI always has admin privileges when doing per machine installation.
I have set the installer to install per machine. But the later steps (advertising) are not very clear.

Thanks
Neelesh

huntant
10-20-2003, 10:15 AM
When my install is first ran it checks to see if the user has admin priviledges, if not, then an error occurs. Because it is a per-machine install and requires admin priviledges, once it is installed, when the install runs again (maintenance mode or patching) it is always elevated.

If you are using a distribution tool, then there should be an option in it to allow you to run the install on the client's machine with an admin account, regardless of the user logged in. I know that this is available in SMS.

For advertising to work, you need to do what I mentioned above. Once the product is install with an admin account and advertised, then a non-admin user can then run the install and it will automatically elevate to the account that orginally installed it.



Anthony

Neelesh Korade
10-20-2003, 10:19 AM
Hi Anthony,
Thanks a lot. This was a very comprehensive help, and my problem is solved.
Thanks a lot
Neelesh