Windows Vista Forums
Vista Forums Home Join Vista Forums Tech Publications Windows 7 Forum Vista Tutorials Webcasts Tags

Welcome to Vista Forums we are your forum for Windows Vista help and discussion. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Vista Newsgroups > Vista security

Problem with manifest file

Update your Vista Drivers
Reply
 
Thread Tools Display Modes
Old 05-01-2007   #1 (permalink)
fig000
Guest


 

Problem with manifest file

Hi,

I'm getting my feet wet with Vista. Some of our users are running
vista home basic. I've looked at some posts and come up with a
manifest file to give our app Administrator privilages at run time.
The app seems to work okay if we check the "run as administrator"
checkbox in the exe's compatibility tab. But we don't want our users
to have to do that, hence the desire to distribute the app with a
manifest file that will take care of the problem.

What happens when the app runs with the manifest present in the exe
directory (we haven't embedded it in the exe yet) is that we get a
message telling us that "The requested operation requires elevation".
This happens if I set uiAccess to true OR false. I don't know if
there's some step I've missed or if the manifest file is wrong. Here
it is:

?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
processorArchitecture="x86"
version="5.6.0.0"
type="win32"
name="myapp.exe"/>
<description>App Description</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="x86"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

Any help would be appreciated.

Thanks,
Fig


My System SpecsSystem Spec
Old 05-02-2007   #2 (permalink)
Jesper
Guest


 

RE: Problem with manifest file

I think you misunderstood what the requestedExecutionLevel attribute is for.
When you set it to requireAdministrator you are telling the OS that this
application must be elevated and therefore you force the elevation prompt.

If your app really needs admin privileges for everything it does, then that
is the correct way to write the manifest. If the app requires admin privs
only for a few things, or if you can factor the things that do require admin
privs in that way, then set the manifest to asInvoker and then use a COM
Moniker to elevate only the pieces you need.
---
Your question may already be answered in Windows Vista Security:
http://www.amazon.com/gp/product/047...otectyourwi-20


"fig000" wrote:

> Hi,
>
> I'm getting my feet wet with Vista. Some of our users are running
> vista home basic. I've looked at some posts and come up with a
> manifest file to give our app Administrator privilages at run time.
> The app seems to work okay if we check the "run as administrator"
> checkbox in the exe's compatibility tab. But we don't want our users
> to have to do that, hence the desire to distribute the app with a
> manifest file that will take care of the problem.
>
> What happens when the app runs with the manifest present in the exe
> directory (we haven't embedded it in the exe yet) is that we get a
> message telling us that "The requested operation requires elevation".
> This happens if I set uiAccess to true OR false. I don't know if
> there's some step I've missed or if the manifest file is wrong. Here
> it is:
>
> ?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <assembly
> xmlns="urn:schemas-microsoft-com:asm.v1"
> manifestVersion="1.0">
> <assemblyIdentity
> processorArchitecture="x86"
> version="5.6.0.0"
> type="win32"
> name="myapp.exe"/>
> <description>App Description</description>
> <dependency>
> <dependentAssembly>
> <assemblyIdentity
> type="win32"
> name="Microsoft.Windows.Common-Controls"
> version="6.0.0.0"
> publicKeyToken="6595b64144ccf1df"
> language="*"
> processorArchitecture="x86"/>
> </dependentAssembly>
> </dependency>
> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
> <security>
> <requestedPrivileges>
> <requestedExecutionLevel
> level="requireAdministrator"
> uiAccess="false"/>
> </requestedPrivileges>
> </security>
> </trustInfo>
> </assembly>
>
> Any help would be appreciated.
>
> Thanks,
> Fig
>
>

My System SpecsSystem Spec
Reply
Update your Vista Drivers

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupt WCP Store - manifest file mikej Windows Updates 4 09-27-2008 01:20 PM
loosely coupling manifest file in VC6 Pointer Vista security 2 08-01-2008 02:16 AM
<file> element of Clickonce application manifest Ken Lemieux .NET General 4 03-03-2008 08:08 AM
External manifest file does not work Krygim Vista General 0 02-23-2007 03:17 AM
External manifest file does not work Krygim Vista General 0 02-22-2007 09:20 PM


Complimentary Industry Resources

Vista Forums has joined forces with TradePub.com to offer you a new, exciting, and entirely free professional resource. Visit http://vistax64.tradepub.com today to browse our selection of complimentary Industry magazines, white papers, webinars, podcasts, and more across 34 industry sectors. No credit cards, coupons, or promo codes required. Try it today!




Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51