I.T. Discussion Community!
-Collapse +Expand
Search DBA Group:

-Collapse +Expand DBA Store

Prestwood eMagazine

November Edition
Subscribe now! It's Free!
Enter your email:

   ► KBDesktop Data...   Print This     
Next Random Article Next Random Tidbit || Change Topic Random From All
DBA Desktop Databases:
Application Manifests, Revisited for Vista
Posted 12 years ago on 1/24/2008
Take Away: Since the introducton of XP, Windows programs have benefitted from an application "Manifest." This was covered in an earlier article. This is an update to that information, pertaining to Windows Vista


In an earlier article, we demonstrated how to get older versions of Delphi programs to take on the "look" of XP.  This was done by adding an application "manifest" to your project.

This was fine for XP, but it's no longer adequate for Windows Vista.  For Vista to begin playing nice with your programs, the manifest needs to be extended a bit.

The other information in the earlier article remains relevant, but the manifest should now look like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker"/>
       <!– <requestedExecutionLevel level=”requireAdministrator” /> –>
        <!– <requestedExecutionLevel level=”highestAvailable” /> –>       

Note the new requestedExecutionLevel element.  This can take one of the three values shown, above (two are commented out).

AsInvoker tells Vista to run your program under the currently logged-in user's permissions. In most cases, this is the value you'll want to use.

requireAdministrator tells Vista that your program must be run under administrator privileges.

highestAvailable is a little obscure, and merits some explanation.

On Vista, when an administrative user logs in, two security tokens are granted.  One has administrative privileges, the other is for an ordinary user.  From that point forward, the user, even though an administrator, is running with the lower rights. 

When he attempts something that requires administrative rights, he's prompted for permission (which can become very annoying - in short order).  When he responds positively to the annoying dialog, his administrator token is applied - for the moment.  Then he goes back to running under the lesser token.

Using hightestAvailable might help alleviate this situation, though probably not entirely.  Essentially, you're instructing Vista to run your program with the highest permissions available to the logged-in user.  If he happens to be an administrator, Vista should respect that request, and your program should be less plagued by annoying OS dialogs.

More Info

Article:  Get the XP Look in Older Versions of Delphi


Share a thought or comment...
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1232A1
Enter key:
KB Post Contributed By Wes Peterson:

Wes Peterson is a Senior Programmer Analyst with Prestwood IT Solutions where he develops custom Windows software and custom websites using .Net and Delphi. When Wes is not coding for clients, he participates in this online community. Prior to his 10-year love-affair with Delphi, he worked with several other tools and databases. Currently he specializes in VS.Net using C# and VB.Net. To Wes, the .NET revolution is as exciting as the birth of Delphi.

Visit Profile

 KB Article #100816 Counter
Since 4/2/2008

Follow PrestwoodBoards on: 

©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech