Vista Compatibility
yidabu
yidabu.spam at gmail.com
Fri Jul 11 03:15:01 PDT 2008
On Fri, 11 Jul 2008 10:25:57 +0200
Frank Benoit <keinfarbton at googlemail.com> wrote:
> yidabu schrieb:
> > On Fri, 11 Jul 2008 11:21:42 +0800
> > davidl <davidl at 126.com> wrote:
> >
> >> 在 Wed, 09 Jul 2008 10:24:12 +0800,yidabu <yidabu.spam at gmail.com> 写道:
> >>
> >>> 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 革命性的电子邮件客户程序: http://www.opera.com/mail/
> >
> > 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="1.0.0.0"
processorArchitecture="X86"
name="ExeName"
type="win32"/>
<description>elevate execution level</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
--
yidabu <yidabu.spam at gmail.com>
http://www.dsource.org/projects/dwin
D 语言-中文(D Chinese):
http://www.d-programming-language-china.org/
http://bbs.d-programming-language-china.org/
http://dwin.d-programming-language-china.org/
http://scite4d.d-programming-language-china.org/
More information about the Digitalmars-d-dwt
mailing list