Installing 'Compatibility Files' in Vista and Windows 7

Posted on 2009-04-22
Last Modified: 2013-11-14
We have a small collection of programs that have data and settings files within our Program Files folder.  Currently we are only installing our programs on XP Pro machines.  Now, we're testing our programs on Vista and Windows 7 beta machines.

One issue that came up is how to deal with the 'compatibility files' in Vista and Windows 7.  Under XP, the database and INI files worked perfectly in our Program Files folder, but in Vista and Windows 7, each user has their own set of these files in their 'VirtualStore' folders (which we don't want).  We need those files to carry data/settings from one user to the next and the users may be Admin or Standard.

The two solutions we came up with have their drawbacks...
1) Force the program to 'Run as administrator'.  The problem with this is if a Standard user runs the program, they will have to enter an Admin password or the UAC settings have to be at the lowest setting (which will be unacceptable for some of our customers).

2) Move the otherwise 'compatibility files' outside of Program Files... which seems very messy way of doing it.

If at all possible, we would like something that is install-and-go without having to deal too much (at all?) with permissions.  Is it a setting in InstallShield?
I'm fairly new to both of these OS, so I'm guessing I'm missing something... or I'd like to know if these are the only ways to go so we can move forward on acting upon a solution.

Thank you in advance,
Question by:MOFA_DEMO
    LVL 12

    Expert Comment


    Have you considered putting the files in the All Users application data folders?  On Windows XP this ens up being C:\Documents and Settings\All Users\Application Data\<Company Name>\<App Name>

    In Vista, it ends up being C:\ProgramData\<Company Name>\<App Name>\

    The one weird thing to deal with in Vista, however, is that I believe that these folders in this directory will gain different rights depending on who creates them.  If an admin runs the initial install then your subfolders are only given write access by other admins.  However, if a normal user creates them I think that all users get write access!  You'll want to double check that, but we use these folders on WinXP/Windows 7/Windows Vista and all works fine for us!

    As for setting the install to do anything special, you just need these files in Features and Components that go to the right place...I think the Installshield property is [CommonAppDataFolder]
    LVL 40

    Accepted Solution

    You basically have already described the solution, and there's not much else.

    Either the user's data must be in user's own directory; usually, the right place for the database and ini files is user's %appdata%, this is the recommended practice;

    or in order to install anything to the location that affects the whole machine, such as %programfiles% or "all users" profile, naturally, the user must be an administrator. There's no way around this, and if there was, it would be security breach.

    One way standard user can install an application requiring admin rights is when the application is assigned to the machine in group policy by the network administrator - in which case it is in fact installed by the administrator's order, so Installer goes into elevated mode.

    See for more details.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
    The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
    This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
    The viewer will learn how to download and install Comodo Backup on Windows 7. Comodo Backup is another solution for backing up your computer. It is free for local backup and online backup has differing amounts depending on storage required. In my op…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now