RE: Elevate permission of code
- From: stcheng@xxxxxxxxxxxxxxxxxxxx ("Steven Cheng")
- Date: Fri, 22 Feb 2008 00:50:29 GMT
Thanks for your reply Zinon,
I'm afraid such programmatic privilege elevation is not allowed in both
windows Vista and windows XP. Actually, if your application can do such
programmatic elevation(to gain a permission your process account not have
originally), then any other application(maybe malicious ) can also do this.
That'll be a big security threaten.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?Wmlub24=?= <zinon@xxxxxxxxxxxxxxxx><yeFdwAFdIHA.4720@xxxxxxxxxxxxxxxxxxxxxx>
References: <1DCC7C7F-725E-4F50-9E92-921BEBBBC069@xxxxxxxxxxxxx>
Subject: RE: Elevate permission of code
Date: Thu, 21 Feb 2008 00:29:00 -0800
privilege),
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
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifthere 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
issuesications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent
followwhere an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
theup response may take approximately 2 business days as the support
professional working with you may need further investigation to reach
situationsmost efficient resolution. The offering is not appropriate for
bestthat require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are
contactinghandled working with a dedicated Microsoft Support Engineer by
rights.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
the
--------------------
From: =?Utf-8?B?Wmlub24=?= <zinon@xxxxxxxxxxxxxxxx>
Subject: Elevate permission of code
Date: Wed, 20 Feb 2008 08:21:01 -0800
Hi All,
I have an application which accesses and modifies the registry during
runtime. The application is being deployed using ClickOnce. However,
ofusers running the application do not have the required privileges tomodify
the registry and the application fails.
Is there a way to elevate the security priveleges of a particular piece
code in order to modify the registry or carry out other tasks which mayhave
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
.
- References:
- RE: Elevate permission of code
- From: "Steven Cheng"
- RE: Elevate permission of code
- From: Zinon
- RE: Elevate permission of code
- Prev by Date: SSPI Server: How to retrieve the username of incoming authentication request
- Next by Date: RE: HowTo Purge Windows (Server 2003) logon session
- Previous by thread: RE: Elevate permission of code
- Next by thread: RE: CryptEncrypt question
- Index(es):
Relevant Pages
|