Windows 7 - programmatically configure an application to work in XP compatibility mode

My application needs administrative access, and I want it to run without any problems in Windows 7.

I have the following options

1. Ask the user using the application to disable UAC. This is an option of last resort and would not want to do this.

2. Generate a manifest in the application that says it has been upgraded to adminstrator privelege. This will work, but it seems that it will open a dialog requiring user consent every time the user launches the application.

3. Configure the application to run in compatibility mode with Windows XP. This works, but I had to do it using the properties explorer-> application. if I can do this programmatically during installation, I would prefer this option. My question is is there a way to achieve this.

considers

Ganesha

+6
windows-7
source share
2 answers

Try to make compatibility with application compatibility , which says that your application needs XP compatibility mode and distributes it with your application. Gasket is a tool that allows administrators to simplify the installation of a third-party application that needs compatibility settings - this allows them to configure each PC individually. You can probably run it in your installer using ingenuity .

+3
source share

I’m used to working with the UAC dialog box that has been running Vista for the past 2 years. If this hurts you, I have to wonder how much experience you have in post-XP OS.

As a user, I think there are two ways to look at it:

  • The program inherently requires an administrator. For this, I really appreciate the dialogue, because I know that this means that no one is going to secretly run this thing in the background and is changing my system.
  • The program at its core does not require an administrator. Most programs only need an administrator to automatically update themselves (and probably then they will not be needed). I think these programs are poorly designed. Such a program should only call AUC if it detects that it needs to be updated, and not in all cases when I run it. This is a security issue, as any buffer overflow that someone finds in the entire program puts me at risk.

To localize the need for UAC as much as possible. It would be best to add a separate executable. (for example: "updater")

+2
source share

All Articles