[virt-tools-list] [virt-viewer PATCH V2] Add InstallScope="perMachine" to virt-viewer.wxs.in

Sandy Stutsman sstutsma at redhat.com
Tue Jun 9 18:38:17 UTC 2015


Hello,

Yeah, I remember looking at this last fall that dual mode perUser/perMachine wixl installers were a problem.  

And I think that a default perMachine installation conforms to most user expectations.

That's my 2cents, anyway.

----- Original Message -----
From: "Marc-André Lureau" <mlureau at redhat.com>
To: "Sandy Stutsman" <sstutsma at redhat.com>
Cc: virt-tools-list at redhat.com
Sent: Tuesday, June 9, 2015 12:10:03 PM
Subject: Re: [virt-tools-list] [virt-viewer PATCH	V2]	Add	InstallScope="perMachine" to virt-viewer.wxs.in

Hi Sandy

----- Original Message -----
> The default installation (say double clicking the .msi file) results in an
> inconsistent installation state, part perMachine/part perUser. (The
> situation that raised the bug.)  The expected behavior is that the default
> installation be consistent. If other clients don't have admin privileges
> they can't install the client.

Did you identify what is mixed exactly?

I can see that per-user install switch to admin install in Windows Installer
log: "Elevation required to install product, will prompt for credentials"

The reason is that MSI prompts for elevation by default, unless msi summary
property Source have NO_PRIVILEGES. This is what InstallScope="perUser"
actually do.

The installation context changes installer behaviour according to msdn:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd765197%28v=vs.85%29.aspx

I can identify 2 sources of elevation requirements:

1) There are 2 ActiveX-related HKLM keys, and I thought I remember per-user install
would have some magic to make them per-user automatically. But I don't know 
where I got that from. But, ActiveX also support HKCU keys nowadays, so we
could solve that.

So we virt-viewer.msi today is a ALLUSERS= with elevated privileges required
so that HKLM key can be created. This is where it probably gets somehow mixed.

If we would simply replace HKLM keys by HKCU we should have per-user
installer, and we could set InstallScope="perUser" too to avoid elevation.
(because I am not convinced we need & want per-machine installer by default)

(Note: HKCU keys when installing with msiexec ALLUSERS=1 to override default
per-user behaviour, the key seems to be limited to the user running the installer,
it would be nice to have HKCU or HKLM depending on context)

2) However, if installed from unpriviledge user with elevation, should the install
location  still be per-user? I wish. But it doesn't even work in unpriviledge perUser.
ProgramFilesFolder always resolve to perMachine for me... I remember that used
to work, I have no idea what went wrong. Using LocalAppDataFolder according
to context would solve this, the same way as choosing HKCU vs HKLM.


All in all, dual perUser/perMachine is proven difficult to get working, so we could switch
to perMachine per default if nobody is able or willing to help here...

anybody? :)




More information about the virt-tools-list mailing list