<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (2/26/10)</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/02/26/hey-scripting-guy-february-26-2010.aspx</link><description>In this post : 
 
 Can I Retrieve the Version of Installed Java Applications? 
 How Can I Run a Function Based on What Is or Is Not Entered on the Command Line? 
 How Can I Properly Use Double Quotation Marks for Expansion? 
 Does Windows 7 Support</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (2/26/10)</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2010/02/26/hey-scripting-guy-february-26-2010.aspx#3315934</link><pubDate>Mon, 01 Mar 2010 04:56:09 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3315934</guid><dc:creator>i1RealTruth</dc:creator><description>&lt;p&gt;I had the same problem with my old scripts not working in Vista or Windows 7. &amp;nbsp;A nice guy like you gave me the code to add. &amp;nbsp;Add Part 1 to the beginning and End If to the very end it will run in Windows 7. &amp;nbsp;That also helps if you want to run a script as an admin on a Windows XP system running a restricted profile.&lt;/p&gt;
&lt;p&gt;1) &amp;nbsp;If you add this to the beginning of your code ....&lt;/p&gt;
&lt;p&gt;' This adds the Admin Run Function for Windows Vista and 7&lt;/p&gt;
&lt;p&gt;' You must put this at the top below computer and End If at the&lt;/p&gt;
&lt;p&gt;' very end of the script&lt;/p&gt;
&lt;p&gt;If WScript.Arguments.length = 0 Then&lt;/p&gt;
&lt;p&gt;Set objShell = CreateObject(&amp;quot;Shell.Application&amp;quot;)&lt;/p&gt;
&lt;p&gt;objShell.ShellExecute &amp;quot;wscript.exe&amp;quot;, &amp;quot;&amp;quot;&amp;quot;&amp;quot; &amp;amp; _&lt;/p&gt;
&lt;p&gt;WScript.ScriptFullName &amp;amp; &amp;quot;&amp;quot;&amp;quot;&amp;quot; &amp;amp;_&lt;/p&gt;
&lt;p&gt;&amp;quot; RunAsAdministrator&amp;quot;, , &amp;quot;runas&amp;quot;, 1&lt;/p&gt;
&lt;p&gt;Else&lt;/p&gt;
&lt;p&gt;And at the very end....&lt;/p&gt;
&lt;p&gt;End If&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3315934" width="1" height="1"&gt;</description></item></channel></rss>