Vista Compatibility

yidabu yidabu.spam at
Fri Jul 11 03:15:01 PDT 2008

On Fri, 11 Jul 2008 10:25:57 +0200
Frank Benoit <keinfarbton at> wrote:

> yidabu schrieb:
> > On Fri, 11 Jul 2008 11:21:42 +0800
> > davidl <davidl at> wrote:
> > 
> >> 在 Wed, 09 Jul 2008 10:24:12 +0800,yidabu <yidabu.spam at> 写道:
> >>
> >>>  Even poorly designed applications that write to protected areas (such  
> >>> as the HKLM registry hive, or to \Program Files directory) can run  
> >>> because Vista intercepts the protected action and prompts you for admin  
> >>> approval before proceeding.
> >> if it's your app, then you're on your own to add this , not DWT library
> >>
> >> -- 
> >> 使用 Opera 革命性的电子邮件客户程序:
> > 
> > This is a trick about Windows Vista Compatibility.
> > 
> > 
> If a user has not privilegues, he can not run the program then?

a user reported that click on the exename.exe on Windows Vista that has not privilegues, nothing happens.

There are a number of ways to elevate the execution level of an executable under Windows Vista.


      Right-click an EXE or its shortcut and select "Run as administrator" from the context menu.

      Right-click and select properties. Click the advanced button (General Tab) and check the "Run as administrator" checkbox.

      Right-click and select properties. Click the "Show Settings for all users" (Compatibility Tab) and check the "Run as administrator" checkbox.

      Login as a real Administrator and run from there (Don't do this. Not secure).

      Mark the executable as requestedExecutionLevel level="requireAdministrator" using a manifest file.

The last method is what really interests us here. We can mark an executable, ship it to a customer, and have confidence that it will run in administration mode on the customer's PC. The down side -- the user will be prompted for approval when they launch the application. But we're all used to that with setup programs under Windows XP.

Manifest file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
    <assemblyIdentity version=""
<description>elevate execution level</description> 
   <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
            <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>

yidabu <yidabu.spam at>

D 语言-中文(D Chinese):

More information about the Digitalmars-d-dwt mailing list