0

I am working on a tool that needs administrative privileges of the computer

I have already put an application manifest for this program in which I have given

<requestedExecutionLevel level="highestAvailable" uiAccess="false" />

This works fine in Windows 7, but it is not working in Windows XP.

Note: I have been using the same .NET Framework version in XP as I used in application.

Whenever I try to use that application in Windows XP, it is not going to the main task that I want.

John Saunders
  • 160,644
  • 26
  • 247
  • 397

1 Answers1

3

You appear to be looking for user account control or UAC, which was introduced in Windows Vista and was not backported to Windows XP. If you need administrator privileges to do something in Windows XP, you need to be logged in as an administrator. Nothing your program does will change that.

The bright side for your question is that Windows XP extended support will end in April 2014, so within a year you can reasonably block installation on Windows XP, under the assumption that any Windows user who uses your program has Windows Vista or newer. This isn't true, of course, but someone who uses an operating system that is out of support is playing with fire, and you probably shouldn't try to support an operating system that the vendor no longer supports.

Adam Mihalcin
  • 14,242
  • 4
  • 36
  • 52