Default installation folder - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

bvelke
Posts: 67
Joined: Fri Jun 10, 2011 6:36 am

Default installation folder

The Application folder is set to:
[AI_ProgramFiles]\[ProductName] (and I've tried [ProgramFilesFolder] and without the slash)
Package Type is:
Mixed 32/64-bit matching the platform
Installation type is set to:
Per machine if user is administrator, per user otherwise.

But instead of installing for a single user to:
"C:\Program Files (x86)\MyProduct\"

The default installation folder is:
C:\Users\User_name\AppData\Local\Programs\MyProduct\

If I try to edit the installation path, it generates this error message:
The installer has insufficient privileges to access this directory: C:\Program Files (x86)\MyProduct\. The installation cannot continue. Log in as administrator or contact your system administrator.

Every Win7/Vista program that I've ever installed as a single user goes into Program Files (x86). What am I doing wrong?

Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Default installation folder

Hi,

This is the normal Windows Installer behavior. If the installation context is switched to per-user, the installer will fail when trying to write in a per-machine location. You can read more about this here:
http://msdn.microsoft.com/en-us/library ... S.85).aspx
http://msdn.microsoft.com/en-us/library ... S.85).aspx
http://msdn.microsoft.com/en-us/library ... S.85).aspx

If it's a per-user installation, it needs to write in per-user locations. A per-user installation which writes in Program Files it's not really a per-user installation.

If you want to force a per-user installation to write in Program Files, you can configure the EXE bootstrapper to request Administrator privileges. However, this will elevate the installer from start and beats the purpose of a per-user installation.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bvelke
Posts: 67
Joined: Fri Jun 10, 2011 6:36 am

Re: Default installation folder

The Help topics "Advanced Installer Package Types" and "Paths of the folders in the 'Files and Folders' Page" say that, under these conditions, ProgramFilesFolder would be interpreted on a 32-bit OS as "C:\Program Files\" and on a 64-bit OS as "C:\Program Files (x86)\".

You're saying that this is true for a per-machine installation but not a per-user installation? If so, I think the help topic is misleading and should be updated.

Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Default installation folder

Hi,

Please note that Program Files is not used by default for a per-user installation. When using "InstallTypeDlg" dialog, the "only for me" option modifies the default installation folder to a per-user location. Like I mentioned in my previous post, you cannot have a per-user installation which installs in Program Files. This is a per-machine location and requires a per-machine installation.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”