In the MSDN https://msdn.microsoft.com/en-us/library/aa367559.aspx
It is mentioned that ALLUSERS = 1 means per machine
2 means permachine(if user is admin) and peruser (if user if non-admin)
null or anyother value means per user.

For testing purpose I have created a msi and it has only one file installing to Program files\testing\1.pdf

I kept the ALLUSERS = 2 and tried to install the msi in limited user, what I expected is to install in %localappdata% or something like that as per user installation but instead, it is giving prompt as below.

1Llj5U.png

Can anybody correct me if I am wrong in my testing.


1 Comment   [ + ] Show Comment

Comments

  • are you using the appropriate Directory values?
    • I din't get you.Can you elaborate please.
      • are you installing to a folder whos parent is [ProgramFilesFolder] and NOT using a custom action to install to Prog Files??
Please log in to comment

Answers

0
>Directory values
Basic Windows security is operating here.

Permissions to %ProgramFiles% or %ProgramFiles(x86)% have all changed. If you want to install there, you'll need to do it as local System/Administrator. Do that or choose a different installation folder as the target.
Answered 03/15/2017 by: VBScab
Red Belt

  • THanks for the input VBScab, but that is where peruser installation should come.

    As per msdn link, ALLUSERS = 2 and MSIINTALLPERUSER = 1 is redirecting the same folder installation to %localappdata%\programs folder.

    But the ALLUSERS = null or other values is gving this error.

    Only ALLUSERS=1 should get this ideally.

    ALLUSERS = null or any other value (other than 1 or 2) should install to per user local appdata folder.
    But it is not like that here, so that's why I posted the question as ALLUSERS property not working.

    ANy suggestion on this?
Please log in to comment
0
I agree that description of the ALLUSERS property is not clear enough.

I would say, that ALLUSERS property sets the MSI installation context in terms of Windows Installer engine registry specific keys. If you install MSI with ALLUSERS="" (or ALLUSERS=2 for non-admin user) then MSI is registered under user's SID in the Installer key (per-user), eg:
HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-2521232340-123123999-1865432130-1004\

while installation with ALLUSER=1 registers MSI in SYSTEM's SID (per-machine):
HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\

MSIINSALLPERUSER defines the target for data installed by the MSI (files, registries, shortcuts). Value 1 means per-user installation (in terms of target locations set to %AppData%/HKCU). When it's not defined then MSI is installed per-machine (according to Directory/Registry tables and does not redirect %ProgramFiles%/HKLM).

Let's say that I have got MSI that installs to Program Files and I install it with ALLUSERS="" by an admin account. I can say that MSI is registered in per-user context but files are installed per-machine.

That's my understanding of per-user and per-machine installation in terms of MSI registration and (separately) for files/registry placement on a hard drive. Please note that I'm referring to Win7 behavior only and you are using this information at your own risk :)
Answered 03/20/2017 by: rad33k
Green Belt

Please log in to comment
0
You are on the right track.
I'm assuming that you are testing on Win7 or later, so read carefully ALLUSERS property definition you are referring to, especially 3rd bullet (ALLUSERS=2) and a remarks for specific operating systems.

You will see that since Windows 7 additional property is required to perform per-user installation - MSIINSTALLPERUSER=1.
Answered 03/12/2017 by: rad33k
Green Belt

  • Yeah I kept 1 for this property also...But still same output.
    • Can you provide log file? (pastebin, googledrive etc.)
      • Not log file, I am attaching the msi directly.Please find the below link.

        https://www.mediafire.com/?stp1al6jlwdo333


        Thank you very much for your time.
      • These are my observations from the msi I shared.

        ALLUSERS = 1 ; permachine
        ALLUSERS = 2 and MSIINSTALLPERUSER = 1 peruser
        ALLUSERS = 2 and MSIINSTALLPERUSER =
        "" or not defined the permachine

        Now if ALLUSERS = any value or null then it should skip reading the value of MSIINSALLPERUSER and install per user if user has limited access but it is installing to permachine and giving error as mentioned.
Please log in to comment
Answer this question or Comment on this question for clarity