RE: Elevate permission of code
- From: Zinon <zinon@xxxxxxxxxxxxxxxx>
- Date: Thu, 21 Feb 2008 00:29:00 -0800
Thanks for the replies.
The app will be deployed on WinXP machines, so unfortunately any solution
involving Vista features is not an option.
So the bottom line, from what I understand, is that it cannot be done?
""Steven Cheng"" wrote:
Hi Zinon,.
As for the privilege elevation, I'm afraid you're limited to the Vista
interactive elevation behavior since the UAC is used to detect any
privileged operations that may occcur in application's code. If it is
allowed to programmatically elevate privilege, then the security hole is
opened again.
So far for applications that may require admin token(elevated privilege),
there are two means:
1. Just let the UAC detect it and request the user to do the elevation
on-demand when executing.
2. Add a manifest for your application and tell what level of execution
permission will it require. Thus, the operating system will demand that
elevation(if necessary) at startup time.
#How To: Tell Vista's UAC What Privelege Level Your App Requires
http://channel9.msdn.com/Showpost.aspx?postid=211271
http://blogs.msdn.com/shawnfa/archive/2006/04/06/568563.aspx
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?Wmlub24=?= <zinon@xxxxxxxxxxxxxxxx>
Subject: Elevate permission of code
Date: Wed, 20 Feb 2008 08:21:01 -0800
modify
Hi All,
I have an application which accesses and modifies the registry during
runtime. The application is being deployed using ClickOnce. However, the
users running the application do not have the required privileges to
the registry and the application fails.have
Is there a way to elevate the security priveleges of a particular piece of
code in order to modify the registry or carry out other tasks which may
security restrictions?Unrestricted
I've tried declaring [RegistryPermission(SecurityAction.Assert,
= true)] on the calling class, as well as:maybe,
RegistryPermission permission = new
RegistryPermission(PermissionState.Unrestricted);
permission.Assert();
..in the method body but with no luck so far. What am I not doing? Or
what should I be doing?
Thanks
Zinon
- Follow-Ups:
- RE: Elevate permission of code
- From: "Steven Cheng"
- RE: Elevate permission of code
- From: lelteto
- RE: Elevate permission of code
- References:
- RE: Elevate permission of code
- From: "Steven Cheng"
- RE: Elevate permission of code
- Prev by Date: RE: Elevate permission of code
- Next by Date: Cannot get reference to Locked screen when the system is in RDP st
- Previous by thread: RE: Elevate permission of code
- Next by thread: RE: Elevate permission of code
- Index(es):
Relevant Pages
|