<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wayne Zimmerman&#039;s Blog &#187; administrator</title>
	<atom:link href="http://www.waynezim.com/tag/administrator/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.waynezim.com</link>
	<description>My World of Tech, Life and Anything Else</description>
	<lastBuildDate>Fri, 10 Feb 2012 00:13:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Allow User To Run Applicaton as Administrator Without a Password</title>
		<link>http://www.waynezim.com/2009/09/allow-user-to-run-applicaton-as-administrator-without-a-password/</link>
		<comments>http://www.waynezim.com/2009/09/allow-user-to-run-applicaton-as-administrator-without-a-password/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 19:26:40 +0000</pubDate>
		<dc:creator>Wayne Zimmerman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[runas]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.waynezim.com/?p=465</guid>
		<description><![CDATA[A few days ago I came across a software application that just wouldn&#8217;t execute correctly without the user being an administrator on the computer. Since all of my users run as basic / limited users they were unable to use program. After contacting the vendor and looking for all type of rights that we could [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I came across a software application that just wouldn&#8217;t execute correctly without the user being an administrator on the computer. Since all of my users run as basic / limited users they were unable to use program. After contacting the vendor and looking for all type of rights that we could grant the user so the could execute the program properly we were unable to fix it without making the user an administrator. So rather than making them an administrator or giving them the administrator password I made a little application that calls the other application as a run as but has the administrator credentials complied in. I realize that you can probably decompile the application and get the password, but for many users that is too much work, or they lack the expertise, so I view this as a small security issue. To further protect the account I made one that only exists on that computer. Below is the code that you can use to build a similar application it is only a few lines but it can solve a headache and keep a password relatively secure.</p>
<p>This is a VB.NET application<br />This application will produce an error if it is unable to login as that account or if the target program cannot be found.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p465code2'); return false;">View Code</a> VB</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4652"><td class="code" id="p465code2"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Public</span> Class Form1
    <span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> Form1_Load(<span style="color: #000080;">ByVal</span> sender <span style="color: #000080;">As</span> System.<span style="color: #000080;">Object</span>, <span style="color: #000080;">ByVal</span> e <span style="color: #000080;">As</span> System.EventArgs) Handles MyBase.Load
        <span style="color: #000080;">Dim</span> DomainName <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>
        <span style="color: #000080;">Dim</span> UserName <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>
        <span style="color: #000080;">Dim</span> Password <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>
        <span style="color: #000080;">Dim</span> SysPassword <span style="color: #000080;">As</span> System.Security.SecureString = <span style="color: #000080;">New</span> System.Security.SecureString()
        DomainName = System.Environment.GetEnvironmentVariable(<span style="color: #800000;">&quot;ComputerName&quot;</span>)
        UserName = <span style="color: #800000;">&quot;administrator&quot;</span>
        Password = <span style="color: #800000;">&quot;supersecretpassword&quot;</span>
&nbsp;
        <span style="color: #000080;">For</span> <span style="color: #000080;">Each</span> c <span style="color: #000080;">As</span> Char <span style="color: #000080;">In</span> Password
            SysPassword.AppendChar(c)
        <span style="color: #000080;">Next</span>
        SysPassword.MakeReadOnly()
&nbsp;
        Try
            System.Diagnostics.Process.Start(<span style="color: #800000;">&quot;notepad.exe&quot;</span>, UserName, SysPassword, DomainName)
        Catch ex <span style="color: #000080;">As</span> Exception
            MsgBox(ex.Message)
        <span style="color: #000080;">End</span> Try
        Me.<span style="color: #000080;">Close</span>()
    <span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
<span style="color: #000080;">End</span> Class</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.waynezim.com/2009/09/allow-user-to-run-applicaton-as-administrator-without-a-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

