Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

UAC Prompt needed


5 replies to this topic

Gareth at Serif

Gareth at Serif
  • Full Members
  • 85 posts

Posted 23 April 2007 - 10:56

Hi guys,

I have an issue with a package I've built which has a number of merge modules, including that for MDAC2.8. This has some properties set on the client side of the installation that need to be passed to the server side in order for it to install when needed. It is not needed on Vista, of course.

The problem is that when I repair the package, some ways of doing so give a UAC prompt and the installation log correctly passes these properties across and everything works. But some methods or repairing do not give a UAC prompt and the merge module gives it's error dialog (trying to install on an unsupported OS) and rolls back the install.

Examples of when it works:
- Click 'Repair' at the top of the Programs & Features dialog in Vista.

Examples of when it doesn't work:
- Right-click the program in Programs & Featurs dialog and 'Repair' from context menu.
- Double-click the original MSI and select 'Repair' in the UI Sequence.

So, how can I insist that the install gets elevated and give the UAC prompt in order to work in all methods of repairing the install?

Many thanks,
Gareth

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 April 2007 - 18:10

I don't understand why you need elevation in order to pass properties to the server side, or maybe I don't understand your question.

Does your setup work (for first time install) in silent mode:
msiexec.exe /i your.msi /q

In this case the UI sequence doesn't run.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 25 April 2007 - 01:57

First of all: I would never install MDAC via a merge module - this is asking for trouble in my opinion. I would much rather run the Microsoft MDAC install in silent mode if required as a prerequisite. The reason for this is exactly the kind of problem you describe with replacement of protected OS files and new OS features such as with Vista. This is particularly relevant now considering MDAC is part of the OS from XP SP2 onwards - why put junk that can break in your MSI when you can keep it outside it?

I assume you have already added the properties in question to the SecureCustomProperties property to indicate that they should indeed be passed to the server process in secured environments?

From the SDK:
"The SecureCustomProperties is a list of public properties delimited by semi-colons. These properties are included with the default list of restricted public properties that the installer can pass to the server side when doing a managed installation with elevated privileges."

Still, it sounds like you might have hit a bug in msiexec / Vista if you ask me. It sounds like the install does not get to run in the correct context because Vista is refusing it.

How does the merge module persist those properties btw? Are they read back from the registry or perhaps dynamically populated on each launch? As Stefan mentions: if the values are set in the UI sequence and you run the setup silent then the properties might not be set at all (since there is no client UI process at all).
Regards
-Stein Åsmul

Gareth at Serif

Gareth at Serif
  • Full Members
  • 85 posts

Posted 25 April 2007 - 10:52

Thanks for your comments.

Stefan:
Yes, the install works silently. It's actually obtained Vista logo verification, so slightly amazed they didn't pick up on this (or perhaps if they had they'd have to fix a bug, lol).

I believe I need elevation to pass properties because the logs for the two repairs (with and without UAC prompt) are almost identicle up until the line...
CODE
Running product '{0B884C9B-5D85-4461-88EE-826E1BB33008}' with elevated privileges: Product is assigned.

Then there are dozens of lines that set properties, including component paths, as such (when there is a UAC prompt)...
CODE
PROPERTY CHANGE: Adding TEMPLATESDIR property. Its value is 'C:\Program Files\Serif\PagePlus\11.0\Wizards\'.

Or like this (when there isn't a UAC prompt)...
CODE
Ignoring disallowed property TEMPLATESDIR

It'd be far more useful if this drastic difference weren't apparent. It seems very dangerous to me and is true of all the packages I've tested, but only some are effected by these properties not being defined, of course.

Glytzhkof:
Setting the properties to secure is possible, but I'm concerned that editing the merge module will break conventions and I'll lose my Vista certification logo. The merge module knows not to install when the properties are passed across, but tries to otherwise and hence the failure. My biggest concern is that this behaviour is only manifesting itself with the MDAC MM and can/will happen in many ways in the future and so would like to overcome this lack of UAC prompt issue.

Regards,
Gareth

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 25 April 2007 - 15:18

When properties are not passed from UI to Execute sequence, the property should be listed in SecureCustomProperties. See also reason #1 in http://www.macrovisi.../is_vista.shtml

Unfortunately a merge module cannot add property names to the SecureCustomProperties property. (This was discussed in a public chat with the Windows Installer team about 2-3 years ago, and I don't think it works now.)

You have two options: Either instuct all merge module consumers to add a few properties to the SecureCustomProperties property, or modify the merge module, adding a custom in the UI sequence that modifies the SecureCustomProperties property.

I don't think you'll loose the certification logo. Although you do change the product, this would mean that any patch will break this logo.

antyagi

antyagi
  • Full Members
  • 121 posts

Posted 05 May 2007 - 19:54

I too have seen similar behavior with one of my setups on Vista.
When choosing repair from Programs & Features dialog (formerly Add/Remove Panel) it never shows UAC prompt and a few CAs (both deferred & immediate) in my setup fails.
But, of course, if I repair by running the setup it works.

Additionally, when I choose uninstall from this Add Remove Panel, it displays UAC prompt, and works fine.
(I am also looking for solution... or atleast a good workaround.)
  ankur tyagi