<?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>Teh Tech &#187; Command Prompt</title>
	<atom:link href="http://tehtech.com/tag/command-prompt/feed/" rel="self" type="application/rss+xml" />
	<link>http://tehtech.com</link>
	<description>Being an Admin is Hard Enough</description>
	<lastBuildDate>Wed, 14 Jul 2010 16:14:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to Rename a File Over a Network Through a Batch File</title>
		<link>http://tehtech.com/how-to-rename-a-file-over-a-network-through-a-batch-file/</link>
		<comments>http://tehtech.com/how-to-rename-a-file-over-a-network-through-a-batch-file/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 04:12:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[Command Prompt]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=349</guid>
		<description><![CDATA[Sometime you need to rename a file or a folder that does not reside on your sever. For example I run a scheduled task on one sever to rename the folder on another server so that I can automatically archive backups weekly. Batch files or command line operations do not support UNC paths like \\myserver\my_share [...]]]></description>
			<content:encoded><![CDATA[<p>Sometime you need to rename a file or a folder that does not reside on your sever. For example I run a scheduled task on one sever to rename the folder on another server so that I can automatically archive backups weekly. Batch files or command line operations do not support UNC paths like \\myserver\my_share without taking some steps first.<br />
<span id="more-349"></span></p>
<p>[ad]</p>
<p>For this example I have a server called &#8220;server01&#8243; is is running a script that will rename a folder called &#8216;Full&#8217; that resides in a share called backup on a server called &#8216;server02&#8242;. First we map to the share, perform the operation, and then unmap the session. This method does not require a drive letter and thus works well and will never cause a DLA conflict.</p>
<p> </p>
<div class="box">net use \\server02\backup<br />
rename \\server02\backup\full \\server02\backup\archive<br />
net use /delete \\server02\backup</div>
<p>Essentially the net use function allows you to then use the path in the script. Remember that if you do not have rights to the folder you are mapping to you may need to specify them in the first line.</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/how-to-rename-a-file-over-a-network-through-a-batch-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Command Prompt Here Context Menu</title>
		<link>http://tehtech.com/add-command-prompt-here-context-menu/</link>
		<comments>http://tehtech.com/add-command-prompt-here-context-menu/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 15:53:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Visual Basic Script (vbs)]]></category>
		<category><![CDATA[Command Prompt]]></category>
		<category><![CDATA[Context Menu]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=237</guid>
		<description><![CDATA[Easy fast administration means less stress. This nifty script aims to save you some time.  This adds the right click context menu to all folders in explorer &#8216;cmd prompt here&#8217;. When you click this option a command prompt with the current directory will be displayed. This is a very useful tool for administrative functions and [...]]]></description>
			<content:encoded><![CDATA[<p>Easy fast administration means less stress. This nifty script aims to save you some time.  This adds the right click context menu to all folders in explorer &#8216;cmd prompt here&#8217;. When you click this option a command prompt with the current directory will be displayed. This is a very useful tool for administrative functions and saves you the time of opening a command prompt and changing directory to the folder you need. Additionally, it gives you a really easy way to walk a user through opening a command prompt window when you need them to run something like ipconfig over the phone. This is a visual basic script and runs silently, so it can be deployed by login script, or GPO as well as kaseya. Just save it as a .vbs.<br />
<span id="more-237"></span></p>
<div class="box">Dim WSHShell<br />
Set WSHShell = WScript.CreateObject(&#8220;WScript.Shell&#8221;)<br />
WSHShell.RegWrite &#8220;HKCR\Folder\Shell\MenuText\Command\&#8221;, &#8220;cmd.exe /k cd &#8221; &amp; chr(34) &amp; &#8220;%1&#8243; &amp; chr(34)<br />
WSHShell.RegWrite &#8220;HKCR\Folder\Shell\MenuText\&#8221;, &#8220;Cmd Prompt Here&#8221;</div>
<p>[ad]</p>
<p>For Kaseya, save the above as cmd_here.vbs, and upload it to the server. Import this script and change the red location to match the location of the file on your server.</p>
<div class="box">Script Name: cmd here<br />
Script Description: Adds &#8216;cmd here&#8217; to the context menu of explorer<br />
IF True<br />
THEN<br />
Write File<br />
Parameter 1 : c:\temp\cmd_here.vbs<br />
Parameter 2 :<span style="font-family: mceinline;"> <span style="color: #ff0000;">admin\VBS\cmd_here.vbs</span></span><br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : c:\WINDOWS\system32\wscript.exe<br />
Parameter 2 : c:\temp\cmd_here.vbs<br />
Parameter 3 : 3<br />
OS Type : 0<br />
ELSE
</div>
<p>
[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/add-command-prompt-here-context-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
