<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Masking Passwords in Windows Scripts</title>
	<link>http://www.nilpo.com/2008/07/windows-scripting/masking-passwords-in-windows-scripts/</link>
	<description>Ask the Windows Guru!</description>
	<pubDate>Sun, 01 Aug 2010 06:36:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Chasmant</title>
		<link>http://www.nilpo.com/2008/07/windows-scripting/masking-passwords-in-windows-scripts/#comment-83357</link>
		<dc:creator>Chasmant</dc:creator>
		<pubDate>Fri, 02 Apr 2010 16:34:28 +0000</pubDate>
		<guid>http://www.nilpo.com/2008/07/windows-scripting/masking-passwords-in-windows-scripts/#comment-83357</guid>
		<description>Is there a way to add your vb script to prompt for user name and password in this script and insert it  this way I don't have to hard code it


' ----- ExeScript Options Begin -----
' ScriptType: window
' DestDirectory: temp
' Icon: default
' OutputFile: C:\ASAP\script.exe
' CompanyName:
' FileVersion: 1.0.0.1
' Creator:  
' ProductVersion: 1.0.0.1
' ----- ExeScript Options End -----
Option explicit
dim wshShell, strpassword
set wshShell=CreateObject("Wscript.Shell")
strpassword = inputbox("Enter Password")
wshShell.run("RunAs /noprofile /user:%computername%\administrator " &#38; Chr(34) &#38; "cmd /c\" &#38; Chr(34) &#38; WScript.Arguments(0) &#38; "\" &#38; Chr(34) &#38; Chr(34))
WScript.Sleep 100
wshShell.AppActivate "RunAs"
'Replace the string --&#62; yourpassword~ below with
'the password used on your system. Include tilde "~"
wshShell.Sendkeys strpassword &#38; "~"
Wscript.Quit</description>
		<content:encoded><![CDATA[<p>Is there a way to add your vb script to prompt for user name and password in this script and insert it  this way I don&#8217;t have to hard code it</p>
<p>&#8216; &#8212;&#8211; ExeScript Options Begin &#8212;&#8211;<br />
&#8216; ScriptType: window<br />
&#8216; DestDirectory: temp<br />
&#8216; Icon: default<br />
&#8216; OutputFile: C:\ASAP\script.exe<br />
&#8216; CompanyName:<br />
&#8216; FileVersion: 1.0.0.1<br />
&#8216; Creator:<br />
&#8216; ProductVersion: 1.0.0.1<br />
&#8216; &#8212;&#8211; ExeScript Options End &#8212;&#8211;<br />
Option explicit<br />
dim wshShell, strpassword<br />
set wshShell=CreateObject(&#8221;Wscript.Shell&#8221;)<br />
strpassword = inputbox(&#8221;Enter Password&#8221;)<br />
wshShell.run(&#8221;RunAs /noprofile /user:%computername%\administrator &#8221; &amp; Chr(34) &amp; &#8220;cmd /c\&#8221; &amp; Chr(34) &amp; WScript.Arguments(0) &amp; &#8220;\&#8221; &amp; Chr(34) &amp; Chr(34))<br />
WScript.Sleep 100<br />
wshShell.AppActivate &#8220;RunAs&#8221;<br />
&#8216;Replace the string &#8211;&gt; yourpassword~ below with<br />
&#8216;the password used on your system. Include tilde &#8220;~&#8221;<br />
wshShell.Sendkeys strpassword &amp; &#8220;~&#8221;<br />
Wscript.Quit</p>
]]></content:encoded>
	</item>
</channel>
</rss>
