<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Security Principles and Local Admin Rights in C# .Net</title>
	<atom:link href="http://OmegaCoder.com/?feed=rss2&#038;p=82" rel="self" type="application/rss+xml" />
	<link>http://OmegaCoder.com/?p=82</link>
	<description>Technology blog written by a Microsoft C# MVP</description>
	<lastBuildDate>Tue, 07 Sep 2010 14:35:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: draculla</title>
		<link>http://OmegaCoder.com/?p=82&#038;cpage=1#comment-2526</link>
		<dc:creator>draculla</dc:creator>
		<pubDate>Mon, 12 Jul 2010 10:36:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.omegacoder.com/?p=82#comment-2526</guid>
		<description>error CS1022: Type or namespace definition, or end-of-file expected</description>
		<content:encoded><![CDATA[<p>error CS1022: Type or namespace definition, or end-of-file expected</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnS</title>
		<link>http://OmegaCoder.com/?p=82&#038;cpage=1#comment-95</link>
		<dc:creator>johnS</dc:creator>
		<pubDate>Thu, 25 Feb 2010 12:46:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.omegacoder.com/?p=82#comment-95</guid>
		<description>is there a way to list all the local users accounts on a given machine using c#?</description>
		<content:encoded><![CDATA[<p>is there a way to list all the local users accounts on a given machine using c#?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Kamoski</title>
		<link>http://OmegaCoder.com/?p=82&#038;cpage=1#comment-94</link>
		<dc:creator>Mark Kamoski</dc:creator>
		<pubDate>Thu, 31 Jan 2008 06:43:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.omegacoder.com/?p=82#comment-94</guid>
		<description>Nice article.

(FYI, the line-numbers wreaks havoc when trying to copy-and-paste the code.)

(FYI, the scroll-bar in the code-box wreaks havoc when trying to print to PDF.)

Question...

...if one just wants to check like this...
            System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

WindowsIdentity myCurrentIdentity = WindowsIdentity.GetCurrent();

if (myCurrentIdentity.User.IsWellKnown(WellKnownSidType.BuiltinAdministratorsSid))
{
    //This is a local admin.
}
else
{
    //This is not a local admin.
}

...then does one really need the line...

System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

...???</description>
		<content:encoded><![CDATA[<p>Nice article.</p>
<p>(FYI, the line-numbers wreaks havoc when trying to copy-and-paste the code.)</p>
<p>(FYI, the scroll-bar in the code-box wreaks havoc when trying to print to PDF.)</p>
<p>Question&#8230;</p>
<p>&#8230;if one just wants to check like this&#8230;<br />
            System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);</p>
<p>WindowsIdentity myCurrentIdentity = WindowsIdentity.GetCurrent();</p>
<p>if (myCurrentIdentity.User.IsWellKnown(WellKnownSidType.BuiltinAdministratorsSid))<br />
{<br />
    //This is a local admin.<br />
}<br />
else<br />
{<br />
    //This is not a local admin.<br />
}</p>
<p>&#8230;then does one really need the line&#8230;</p>
<p>System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);</p>
<p>&#8230;???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: omegaman</title>
		<link>http://OmegaCoder.com/?p=82&#038;cpage=1#comment-93</link>
		<dc:creator>omegaman</dc:creator>
		<pubDate>Tue, 18 Sep 2007 15:14:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.omegacoder.com/?p=82#comment-93</guid>
		<description>I will have to test it on Vista, my primary machine is still XP. Thanks for the heads up!</description>
		<content:encoded><![CDATA[<p>I will have to test it on Vista, my primary machine is still XP. Thanks for the heads up!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Blaivas</title>
		<link>http://OmegaCoder.com/?p=82&#038;cpage=1#comment-92</link>
		<dc:creator>Alex Blaivas</dc:creator>
		<pubDate>Mon, 17 Sep 2007 21:18:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.omegacoder.com/?p=82#comment-92</guid>
		<description>Hi mega,

I don&#039;t know if you&#039;ve tried this code in Vista, if not, you may be for a few nasty surprises.

I got &quot;Request for Principal&#039;s Permission Denied&quot; or close. This Vista is a complete run around when it comes to security. I think it makes everything secure by simply welding all the doors solid.</description>
		<content:encoded><![CDATA[<p>Hi mega,</p>
<p>I don&#8217;t know if you&#8217;ve tried this code in Vista, if not, you may be for a few nasty surprises.</p>
<p>I got &#8220;Request for Principal&#8217;s Permission Denied&#8221; or close. This Vista is a complete run around when it comes to security. I think it makes everything secure by simply welding all the doors solid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Blaivas</title>
		<link>http://OmegaCoder.com/?p=82&#038;cpage=1#comment-91</link>
		<dc:creator>Alex Blaivas</dc:creator>
		<pubDate>Mon, 17 Sep 2007 20:54:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.omegacoder.com/?p=82#comment-91</guid>
		<description>Thanks Omega, you are super. It is very helpful. I hope you could help me with three other problems/posts.

I got into this thing as a diversion while waiting for other answers to materialize. However, I do want to establish a &quot;subterrain&quot; security tracking system in my major apps that will monitor things in the background for unexplained and unexpected changes in the system. It is a long term, slowly developing track.

Thanks - Alex</description>
		<content:encoded><![CDATA[<p>Thanks Omega, you are super. It is very helpful. I hope you could help me with three other problems/posts.</p>
<p>I got into this thing as a diversion while waiting for other answers to materialize. However, I do want to establish a &#8220;subterrain&#8221; security tracking system in my major apps that will monitor things in the background for unexplained and unexpected changes in the system. It is a long term, slowly developing track.</p>
<p>Thanks &#8211; Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: omegaman</title>
		<link>http://OmegaCoder.com/?p=82&#038;cpage=1#comment-90</link>
		<dc:creator>omegaman</dc:creator>
		<pubDate>Fri, 14 Sep 2007 12:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.omegacoder.com/?p=82#comment-90</guid>
		<description>&lt;p&gt;The string.join line which has this format &lt;/p&gt;
&lt;p&gt;&quot;,{0}tt&quot;&lt;/p&gt;
&lt;p&gt;Wordpress has stripped out the escape it should be&lt;/p&gt;
&lt;p&gt;&quot;,{0}\t\t&quot;&lt;/p&gt;
&lt;p&gt;But it will have no effect due to the new line, so simply have&lt;/p&gt;
&lt;p&gt;&quot;,{0}&quot;&lt;/p&gt;
&lt;p&gt;As the pattern.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>The string.join line which has this format </p>
<p>&#8220;,{0}tt&#8221;</p>
<p>WordPress has stripped out the escape it should be</p>
<p>&#8220;,{0}\t\t&#8221;</p>
<p>But it will have no effect due to the new line, so simply have</p>
<p>&#8220;,{0}&#8221;</p>
<p>As the pattern.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
