MSI Installations on Windows 7

I wonder if someone could give me some guidance.  What is the recommended locations when installing custom applications on Windows 7 with the following requirements:

Common EXE for all users
Default configuration XML file for all users
User configurable XML file
I have tried installing the EXE and default XML's to C:\Program Files\<MyCompany>\<MyApp>\<MyVersion>, and although I can run the EXE with any user account, I cannot access the default XML's should the user want to restore the default settings following any user configuration changes.  The error is "Access to path is denied".

Should I use %APPDIR% or [AppDataFolder] settings in the MSI builder and if so how?

In the past, on Windows XP, I would create a new folder at the root of C:\ and install the EXE and any user configuration files to the same.  This has been sufficient for a number of years although only in a single-user/single-machine environment.  Now, with multiple users per-machine and Windows 7 this is no longer sufficient.

Any help would be most appreciated.
JulieSenior Analyst/ProgrammerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Oleg MeierPackaging AdministratorCommented:
use [CommonAppDataFolder] for all users. That is the C:\ProgramData under win7 or
C:\Documents and Settings\All Users\Application Data\ on XP
JulieSenior Analyst/ProgrammerAuthor Commented:
Hi, thanks for the quick response.

I can happily install to the [CommonAppDataFolder] when I run the MSI with administrator privileges, and I can see it in Explorer with the logged on user and show hidden folders turned on, but I still get the "Access to path <...> is denied" error when I try to use the files put there.

However, following your train of thought, I tried using [LocalAppDataFolder] and this seems to work OK.  Is there a reason why I shouldn't use this configuration?  Is there a down side?
Oleg MeierPackaging AdministratorCommented:
that is just best practice from me. AppDataFolder and LocalAppDataFolder belongs to the Property ALLUSERS. Not the CommonAppDataFolder it is allway the same
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

JulieSenior Analyst/ProgrammerAuthor Commented:
Apologies for the delay.

So, if I understand you correctly, use [CommonAppDataFolder] for EXE files common to all users and [LocalAppDataFolder] for configurable settings per user?
Oleg MeierPackaging AdministratorCommented:
Hi. Read here


The full path of the folder that contains application data for all users.


The full path of the Program Menu folder.

    Windows Vista and later:  The full path of the Roaming folder.

(Of  the curret user who install the MSI)

Shortly: the LocalAppDataFolder  and AppDataFolder belongs to the User who install the MSI.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JulieSenior Analyst/ProgrammerAuthor Commented:
Thanks for all your assistance and guidance, most appreciated.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.