Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Installing 'Compatibility Files' in Vista and Windows 7

Posted on 2009-04-22
3
Medium Priority
?
1,697 Views
Last Modified: 2013-11-14
Hello,
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,
Mofa
0
Comment
Question by:MOFA_DEMO
2 Comments
 
LVL 12

Expert Comment

by:jmcmunn
ID: 24221015

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]
0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 2000 total points
ID: 24224058
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 http://msdn.microsoft.com/en-us/library/aa369519(VS.85).aspx for more details.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't know how to downgrade, my instructions below should be helpful.
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Suggested Courses
Course of the Month11 days, 19 hours left to enroll

564 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