Re: Vista and file associations
- From: Max Pyatnitsky <mpyat@xxxxxxxxxxxxxx>
- Date: Mon, 16 Oct 2006 17:34:39 +0300
Strange: according to http://windowsconnected.com/blogs/jerry/archive/2005/12/21/97.aspx
I have to add manifest with level="highestAvailable" specification.
But on my Vista RC1 build 5728 it does not work when I'm truing to write to HKET_LOCAL_MACHINE (doing the same thing as Brian, i.e. making file assocociation; instead, when I rename my program to something, which contains "setup" in it's name (for example "DataLoader - setup.exe", orig. name was "DataLoader.exe"), Vista is warning me that the program tries to get access to my comp and if I say "OK" it runs my program and then allows it to change file association. So, indeed, the behaviour is defined by program's name, not by manifest (at least in Vista RC1 build 5728). Strange...
klunk wrote:
.And yes, I'm running the app as administrator..
In Vista, when User Account Control (UAC) is in effect, any
user with "administrator" rights operates under
what MS is calling a split token -- which means effective rights
are as a limited user except when rights are elevated to perform
tasks that require admin rights. The executable requiring admin
rights must request them via a manifest setting. Apps that attempt
to write to protected areas without proper elevation will either fail,
or have their writes go to either a file or registry "Virtual Store."
You shouldn't elevate your main exe, since it shouldn't require
admin rights to do its normal functions. What you need is a
separate exe to run your admin related routines that can request
admin rights elevation via a manifest.
The fact that an admin user is not always an admin is going to
be one of the most confusing and difficult things for users to
understand and get used to, in my opinion.
Here are some links to documents that explain all this in more
detail:
UAC:
http://blogs.msdn.com/uac/
http://blogs.msdn.com/uac/archive/2006/06/28/650262.aspx
VirtStore:
http://windowsconnected.com/blogs/jerry/archive/2005/12/19/86.aspx
Manifests:
http://windowsconnected.com/blogs/jerry/archive/2005/12/21/97.aspx
- References:
- Vista and file associations
- From: Brian
- Re: Vista and file associations
- From: klunk
- Vista and file associations
- Prev by Date: Re: Stop the negativism!
- Next by Date: Re: Something Delphi does better than VS
- Previous by thread: Re: Vista and file associations
- Next by thread: Re: Vista and file associations
- Index(es):
Relevant Pages
|