Msi is not asking for Elevation prompt if UAC is enabled

panneer's picture

Hi,

From the installer i'm running some .reg files which will merge some registry keys to registry. If UAC is enabled in Windows 2008 R2 machines, merging to registry is failing.
My output file is ProductName.msi
When i was going through some of the threads in this forum, i read that installer will prompt for elevation and by allowing it will grant the permission to run the installer with admin privileges.
But when i run my .msi file, i'm not getting that elevation prompt with Allow and Cancel options.
What should i do to get that elevation prompt?

Thanks for the Help,
Panneer.
 

EdT's picture

Try renaming your MSI

The UAC system looks for files called setup.xxx or install.xxx, as these name are automatically recognised as installers.
So try renaming your MSI before you do anything else.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

panneer's picture

Thanks for the reply. I tried

Thanks for the reply. I tried renaming my msi to install.msi and setup.msi but still i'm not getting the elevation prompt for both.
From the Wise Installer, i tried generating the output file as single .exe and if i run that exe file, i'm getting that elevation prompt.
Is that elevation prompt will be prompting only for .exe files?
Should i change the output file of my installer from .msi to .exe?
Please advice.

Thanks for the help,
Panneer.

VBScab's picture

Eh?

> i'm running some .reg files which will merge some registry keys to registry

Why? Use the Registry table!

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

panneer's picture

Thanks for the reply. We are

Thanks for the reply.

We are having many .reg files from earlier releases and hence we are continuing with it.

Thanks for the Help,
Panneer.

EdT's picture

What version of Wise are you using?

If you have V7, do you have "Enable User Account Control" selected in the Windows Installer Options menu in Installation Expert?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

panneer's picture

Wise Installation Studio 7.0

I'm using Wise Installation Studio 7.0 and in 'Installation Expert->Windows Installer Options->Enable User Account Control' option is selected.

Thanks for the Help,
Panneer.

EdT's picture

regedit blocked?

Installing REG files requires regedit to be available. Any chance that registry editing is disabled by Policy?
Are you installing HKLM or HKCU registry entries?  Is your custom action running in system or user context?

Check the Altiris knowledgebase on "Vista" for the Wise product categories - there may be additional information that you will find helpful.

As VBScab has already remarked, you are just making life difficult for yourself by using REG files instead of using the registry table.
If you want to keep the reg entries separated, you could place the contents of each REG file into a merge module, or even into a separate component.
Just because you have always done it that way in the past, does not mean it is not time to update your methodology to embrace new operating systems.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

panneer's picture

I'm using HKLM registry

I'm using HKLM registry entries. The custom actions are running under User context.

Regarding moving the contents from .reg file to Installer Registry table, i need to discuss with my manager and do it.

Its not only failing on .reg file, we are having some C++ functions which we are using in Custom Actions which will stop some services at the beginning of installation and start those services at the end of installation. I guess that also requires elevated previliges to execute. [This Custom action is run under Immediate sequence]

Is there a way to get that elevation prompt while launching .msi file?

Thanks for the Help,
Panneer.

kkwapnioski's picture

Elevate entire installation

Check your settings in the Installation Expert under "Windows Installer Options". In the UAC Compatibility Settings you might have selected "Elevate Deffered Execution sequence only" and from the sound of it you need to select "Elevate entire installation".

panneer's picture

Under Installation

Under Installation Expert->Windows Installer Options i'm able to see only one check box for UAC (Enable User Account Control). I'm using Wise Installation Studio 7.0

Thanks for the Help,
Panneer.

EdT's picture

Which product are you using?

kkwapnioski....
There is no option to set UAC Compatibility settings in WIS 7. Are you using a different product or thinking about policy settings ??

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture

Generally speaking...

...users don't have privileges to write to HKLM nor to control services.

- Best practise is that changes to the system should be in ExecuteDeferred.
- Why use CAs to control services when you have the ServiceControl table?

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

panneer's picture

The reason why we use .reg

The reason why we use .reg file is, each .reg file will have multiple entries and Developers will keep on changing the contents of .reg file frequently. Hence we are having like including that .reg file in installer and add step to merge all contents to registry, so that installer need not be changed frequently.

I read in some sites that if .msi file is launched if UAC is enabled, it will execute with elevated previleges. But the custom actions which is running from .msi installer is not having those previleges. Is there a way to run my custom actions also with the elevated previleges the installer runs?

Thanks for the Help,
Panneer.

 

 

EdT's picture

Custom actions...

...can be run in system or user context. Check that yours are running in system context.

Also, search on Vista in the Altiris Knowledgebase, against the Wise products. There is an article that discusses some of the aspects of packaging and Vista UAC

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.