yeilam
Posts: 19
Joined: Sun Aug 13, 2006 6:22 am

Instalation type does not work for me

I'm using Advanced Installer 10.9.1
In Install parameters section, I select Installation type = "Per Machine if user is administrator, per user otherwise"
In Windows 7 64 bit enterprise edition I created a "test" user which is NOT an administrator. (Belongs to local "Users" group).
When I run the setup it tries to install in Program Files, and fails as it does not have permissions.

Notes:
1) The ApplicationFolder field is: [ProgramFiles64Folder][ShortManufacturer2]\[ProductName]
I prefer this to be the folder (at least if the user is an administrator), or would you recommend something different?

2) The User Account Control Settings of the machine are set to minimum ("never notify").

BTW, I remember vaguely (from VISTA) something about "VirtualStore" folder. Is it connected to this issue? I could not find anything in your documentation about it.

Thanks,
Yigal
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Instalation type does not work for me

Hi Yigal,

Please keep in mind that when you choose the "Per Machine if user is administrator, per user otherwise" installation type from the Install Parameters page, the "Application Folder" is automatically changed to the "[AI_UserProgramFiles][Manufacturer]\[ProductName]" value. So, you should not change the [AI_UserProgramFiles] property from that value because that property is automatically set to the correct folder according to the type of the user (administrator or standard user).

If you replace it with the [ProgramFiles64Folder] property, then your application will always try to install its files under the "Program Files" folder and it will fail for a standard user, because it does not have the necessary permissions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
yeilam
Posts: 19
Joined: Sun Aug 13, 2006 6:22 am

Re: Instalation type does not work for me

I tried: Application Folder: [AI_UserProgramFiles]
and then the application was installed under "D:\APPDIR".
This is not a standard place to install applications, is it?

I tried: Application Folder: [AI_UserProgramFiles][ShortManufacturer2]\[ProductName]
(to have different applications in different folders)
and then I get an error message right when I operated the resulted Setup program:
Dialog box "Installer Information" says: "Could not access network location Geosim Systems\Virtual Vancouver"
which is even more strange to me.

The same folder (D:\APPDIR) is used both for administrator and for non administrator, which is also not what I would expect.
BTW, what if the non administrator does not have permissions to create a D:\ sub folder?

Wouldn't it be better to always install in [AppDataFolder]?
(Which is per user but seems better than what I got with [AI_UserProgramFiles])

Yigal
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Instalation type does not work for me

Hi Yigal,

I'm not sure why you encounter this behavior. It seems that there is a property-based folder which value is not resolved to a correct location. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
yeilam
Posts: 19
Joined: Sun Aug 13, 2006 6:22 am

Re: Instalation type does not work for me

Attached.
Thanks.
Yigal
Attachments
MSI14c20.LOG
(55.72 KiB) Downloaded 407 times
VV64.aip
(185.67 KiB) Downloaded 380 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Instalation type does not work for me

Hi Yigal,

I looked over your AIP file and I found that the "AI_SETMIXINSTLOCATION" custom action, that is added automatically when the "Per Machine if user is administrator, per user otherwise" installation type is chosen, was missing. I edited your AIP file and to add that custom action and attached it to this post.

Also, in order to have the option to install the package "per-machine" or "per-user" you can go in the Dialogs page and add the "InstallTypeDlg" predefined dialog.

Let us know if this helped.

Best regards,
Eusebiu
Attachments
VV64.aip
(185.88 KiB) Downloaded 479 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
yeilam
Posts: 19
Joined: Sun Aug 13, 2006 6:22 am

Re: Instalation type does not work for me

Hi,
With the aip you sent me we are back at square one:
For administrator user it successfully installs in Program Files
For non administrator user it STILL suggests installation in c:\Program Files and fails.
Log is attached (non administrator).
Thanks,
Yigal
Attachments
MSIb8be2.txt
(222.2 KiB) Downloaded 349 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Instalation type does not work for me

Hi Yigal,

Indeed, the "AI_SETMIXINSTLOCATION" custom action changes the path to a per-user or a per-machine location depending on the MSIINSTALLPERUSER property, but this property is not set accordingly starting with Windows Vista due to the UAC, so the "AI_SETMIXINSTLOCATION" custom action works well only on Windows XP and below.

However, as I mentioned in my previous post, you can add the "InstallTypeDlg" predefined dialog and the user will have the option to choose between installing the package per-user or per-machine and also the path will be correctly chosen by the "AI_AuthorSinglePackage" event available on that dialog.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
yeilam
Posts: 19
Joined: Sun Aug 13, 2006 6:22 am

Re: Instalation type does not work for me

With the "InstallTypeDlg" it works.
A related small problem:
I have some registry settings to HKEY_Local_Machine.
Can I avoid them only in "per user" mode?
(as it now creates an error message and I would want to ignore them but only if installation is per user)
Thanks,
Yigal
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Instalation type does not work for me

Hi Yigal,

In order to achieve what you want you can follow the steps below:
- go in the Dialogs page on the "InstallTypeDlg" dialog and create a "Set installer property value" published event on the [Next] button like follows:
  • Property: [INSTALLPERUSER]
    Value: [AI_InstallPerUser]
- go in the Organization page, select the components related to the registry keys that you want to avoid and set the following condition for them: [INSTALLPERUSER] = "0"
- build and run the package

If the [INSTALLPERUSER] property is equal with "0", it means that the [AI_InstallPerUser] property is also equal with "0" and the installation is per-machine and only in this case your registry keys will be created.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
yeilam
Posts: 19
Joined: Sun Aug 13, 2006 6:22 am

Re: Instalation type does not work for me

Will that be available only to "Enterprise" license?
No way to do it with "Professional" license?
Thanks,
Yigal
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Instalation type does not work for me

Hi Yigal,

With the Professional version, you can create a "Set installer property" custom action under the "Wizard Dialogs Stage -> User Selection" action group, instead of the "Set installer property value" published event, but with the same configuration.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
yeilam
Posts: 19
Joined: Sun Aug 13, 2006 6:22 am

Re: Instalation type does not work for me

Yes.
It works.
Thanks a-lot
Yigal
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Instalation type does not work for me

You're welcome Yigal. I'm glad you got this working.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”