Re: Problem with manifest file under vista basic home

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Woodie,

Thanks for the example. Any help I can get on this is appreciated.
Your manifest looks similar to mine. So I'll ask if you embedded
it in the exe. I sent an email to the folks at the uac team and was
told to embed the manifest file. I'm about to try that.

If that doesn't work, I'd be interested to know if your fresh
install has some UAC policy set differently than mine. From what I can
see changing some of these policies (secpol.msc) is only possible on
other versions of vista (I tried following an article to change these
on my home vista machine and kept running into disclaimers like "this
can be done on on vista ultimate...."

Thanks again,
Neil
Woodie M wrote:
Sorry Fig, I misunderstood your first post.

I don't have an answer for you, but FWIW I have a small app that I just
tested under a fresh install of Vista Home Basic. It tried it with a
manifest file much like yours (pasted in below) and it gives me the expected
UAC prompt.

My 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="Freedom Software.Worship Him.Worship Him"
type="win32" />
<description>Manifest for Worship Him key entry</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*" />
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

-Woodie

"fig000" <neilnewton001@xxxxxxxxx> wrote in message
news:1178131062.567670.287160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks to everyone who answered.

I can understand the need for the elevation prompt. However I'm not
getting that. On vista ultimate the manifest I added (see above)
gives the desired results: the user gets an elevation prompt and if
they choose to allow it, the app runs. On vista home basic, the same
manifest causes a message to be shown: "The requested operation
requires elevation" and I don't see the UAC prompt. I'm not trying for
a "silent elevation", I'm just trying to get the UAC prompt which will
allow the app to run as an admin.

Any advice would be appreciated.

Fig

On May 2, 8:32 am, "Woodie M" <wood...@xxxxxxxxxxx> wrote:
"fig000" <neilnewton...@xxxxxxxxx> wrote in message

news:1178046629.742831.165050@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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 is what it's supposed to do - even if you right-click and select
'Run
as admin' instead of using a manifest file and even if the user is logged
on
to Windows as a user with admin rights. Vista won't give an app admin
privelidges without prompting the user first. If the user is logged on as
admin, they just have to click OK. If they're a non-admin they will have
to
provide an admin logon-password. Now, here's a possible catch: When the
user
is not an admin user but a program runs as administrator and the user
provides the admin password for elevation, because of UAC the now
admin-elevated program actually runs as the admin user - not the
standard
user that granted elevation. This means when the app uses the api to find
the location of for instance the 'My documents' folder, it will be
accessing
the 'My documents' folder of the admin user account, not the standard
user
that granted the elevated privelidges.

I'm no expert here either, but I've done a bit of work with my apps on
this
and think (someone correct me if I'm wrong) I have begun to get a handle
on
it finally.

-Woodie

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



.



Relevant Pages

  • Re: Manifests and requestedExecutionLevel
    ... The existing app is a single executable, ... Since you already have the small .exe running, ... And Admin user priviledge is High MIC. ... The manifest has the capability of telling Vista that it needs to be started ...
    (microsoft.public.vc.mfc)
  • Re: Problem with manifest file under vista basic home
    ... I'm getting my feet wet with Vista. ... manifest file to give our app Administrator privilages at run time. ... This is what it's supposed to do - even if you right-click and select 'Run as admin' instead of using a manifest file and even if the user is logged on to Windows as a user with admin rights. ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem with manifest file under vista basic home
    ... I can understand the need for the elevation prompt. ... On vista ultimate the manifest I added ... allow the app to run as an admin. ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem with manifest file under vista basic home
    ... I don't have an answer for you, but FWIW I have a small app that I just tested under a fresh install of Vista Home Basic. ... It tried it with a manifest file much like yours and it gives me the expected UAC prompt. ... I can understand the need for the elevation prompt. ... allow the app to run as an admin. ...
    (microsoft.public.vb.general.discussion)
  • Re: Howto evaluate if current user is of administrators group?
    ... In terms of having an app that both admin and non-admin users can do stuff with, I haven't don't much in that line, however, my understanding is that apps are either running with an admin token or not, and there isn't a way to "add one" later. ... It confirms that you have to run an exe separately to have admin privs, however, you can use CreateProcess to run an app with admin rights, so you could theoretically keep it all in 1 exe and re-run it if you need to elevate. ... again you say someting like "just manifest your application to require xxx privileges". ...
    (microsoft.public.development.device.drivers)