cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
michaelmalak
Level 3

Prevent ProgramData files from being virtualized

I discovered that Windows 7 was copying files I had installed to C:\ProgramData (CommonAppDataFolder), such a Microsoft Access .mdb file, to each individual user's folder (e.g. C:\Users\All Users). I figured out that the main reason it was doing so was because I needed to tell InstallShield to add "Full Control" security for the group "Users" for that .mdb file. So now the security is being set correctly on install, but it is still creating a copy of the .mdb file in C:\Users\All Users. My installed software is no longer making use of that copy of the .mdb file -- I can delete that .mdb file out of C:\Users\All Users and my installed software will work.

I've tried changing the security on my development copy of the .mdb file (from which Installshield pulls the copy to bundle into the install) to include Full Control for the group "Users", but that didn't help -- probably because the "Users" group on my development computer is different than the "Users" group on the destination computer.

Is there any way to prevent Windows 7 from making a virtualized shadow copy of my .mdb file when InstallShield installs it into the C:\ProgramData folder?
Labels (1)
0 Kudos

(3) Replies
Christopher_Pai
Level 16

What is your ALLUSERS property set to? Does the user performing the installation have Admin privledges?

MSI/InstallShield should have no problem installing to CommonAppData folder, I do it all the time. Your running application however may use redirection though if the user doesn't have permissions and the application doesn't have an application manifest. Basically Windows AppCompat team takes the approach that no manifest means broken legacy application and "helps" it.
0 Kudos
michaelmalak
Level 3

I was previously unfamiliar with ALLUSERS. I just now added an ALLUSERS to the global Property table in InstallShield and set it to 2. It didn't help.

Another thing I tried is also setting in Installshield the permissions for both C:\ProgramData\MyCompanyName and C:\Program\MyCompanyName\MyProductName (the Microsoft Access .mdb file is stored there) and those did not affect the permissions after installation (even though that did work on the .mdb file itself).

I'm guessing that the reason Windows 7 is virtualizing is because those directories do not have read/write permission at the time the installation is copying the .mdb file over.
0 Kudos
michaelmalak
Level 3

It turns out to be a non-problem.

C:\Users\All Users is a symbolic link (symbolic links are new to Vista/W7) that points to C:\ProgramData. So installing a file into C:\ProgramData creates one physical copy that is visible from both C:\ProgramData and C:\Users\All Users. That C:\Users\All Users is a symbolic link can be determined either by right-clicking properties on All Users from within Windows Explorer, or by doing dir /ah (hidden directories) in the Command Prompt while in the C:\User directory.
0 Kudos