<?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>Leoganda.net &#187; Scripting</title>
	<atom:link href="http://www.leoganda.net/tag/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leoganda.net</link>
	<description></description>
	<lastBuildDate>Fri, 09 Dec 2011 04:12:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Execute an exe from VBS with space in file name</title>
		<link>http://www.leoganda.net/execute-an-exe-from-vbs-with-space-in-file-name/</link>
		<comments>http://www.leoganda.net/execute-an-exe-from-vbs-with-space-in-file-name/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 03:33:46 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[VBS]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=118</guid>
		<description><![CDATA[Hi All, I was having problem on executing an exe file from vbs, the problem was the exe path has space between it. For example &#8220;C:\Program Files\test\my app.exe&#8221;. The vbs will returns an error which says file not found for that path. This is happened because after the space, the vbs will treat the entire [...]]]></description>
			<content:encoded><![CDATA[<p>Hi All,</p>
<p>I was having problem on executing an exe file from vbs, the problem was the exe path has space between it. For example &#8220;C:\Program Files\test\my app.exe&#8221;.</p>
<p>The vbs will returns an error which says file not found for that path. This is happened because after the space, the vbs will treat the entire command after the space as arguments.</p>
<p>To fix it we can use multiple quote like this.</p>

<div class="wp_syntax"><div class="code"><pre class="vbs" style="font-family:monospace;">wscript.run &quot;&quot;&quot;C:\Program Files\test\my app.exe&quot;&quot;&quot;</pre></div></div>

<p>Use 3 quote.</p>
<p>What if we want to use arguments in our command?</p>

<div class="wp_syntax"><div class="code"><pre class="vbs" style="font-family:monospace;">wscript.run &quot;&quot;&quot;C:\Program Files\test\my app.exe&quot;&quot; /command args&quot;</pre></div></div>

<p>Cheers!</p>
<h4>What people search:</h4><ul><li><a href="http://www.leoganda.net/execute-an-exe-from-vbs-with-space-in-file-name/" title="exe to vbs">exe to vbs</a></li><li><a href="http://www.leoganda.net/execute-an-exe-from-vbs-with-space-in-file-name/" title="vbs space in file path">vbs space in file path</a></li><li><a href="http://www.leoganda.net/execute-an-exe-from-vbs-with-space-in-file-name/" title="run exe from vbs">run exe from vbs</a></li><li><a href="http://www.leoganda.net/execute-an-exe-from-vbs-with-space-in-file-name/" title="vbs execute exe">vbs execute exe</a></li><li><a href="http://www.leoganda.net/execute-an-exe-from-vbs-with-space-in-file-name/" title="vbs run exe">vbs run exe</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/execute-an-exe-from-vbs-with-space-in-file-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to execute an exe from vbScript</title>
		<link>http://www.leoganda.net/how-to-execute-an-exe-from-vbscript/</link>
		<comments>http://www.leoganda.net/how-to-execute-an-exe-from-vbscript/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 03:24:48 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[VBS]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/?p=115</guid>
		<description><![CDATA[Sometime we will need to execute an exe file from our vbs, so here&#8217;s the snippet. Set wsShell = WScript.CreateObject(&#34;WScript.shell&#34;) wsShell.run &#34;C:\windows\system32\calc.exe&#34; What people search:vbscript execute exerun exe from vbscriptvbscript to execute exehow to execute exe from vbscripthow to execute exe in vbscript]]></description>
			<content:encoded><![CDATA[<p>Sometime we will need to execute an exe file from our vbs, so here&#8217;s the snippet.</p>

<div class="wp_syntax"><div class="code"><pre class="vbs" style="font-family:monospace;">Set wsShell = WScript.CreateObject(&quot;WScript.shell&quot;)
wsShell.run &quot;C:\windows\system32\calc.exe&quot;</pre></div></div>

<h4>What people search:</h4><ul><li><a href="http://www.leoganda.net/how-to-execute-an-exe-from-vbscript/" title="vbscript execute exe">vbscript execute exe</a></li><li><a href="http://www.leoganda.net/how-to-execute-an-exe-from-vbscript/" title="run exe from vbscript">run exe from vbscript</a></li><li><a href="http://www.leoganda.net/how-to-execute-an-exe-from-vbscript/" title="vbscript to execute exe">vbscript to execute exe</a></li><li><a href="http://www.leoganda.net/how-to-execute-an-exe-from-vbscript/" title="how to execute exe from vbscript">how to execute exe from vbscript</a></li><li><a href="http://www.leoganda.net/how-to-execute-an-exe-from-vbscript/" title="how to execute exe in vbscript">how to execute exe in vbscript</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/how-to-execute-an-exe-from-vbscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Powershell FTP</title>
		<link>http://www.leoganda.net/simple-powershell-ftp/</link>
		<comments>http://www.leoganda.net/simple-powershell-ftp/#comments</comments>
		<pubDate>Mon, 03 May 2010 15:36:51 +0000</pubDate>
		<dc:creator>leoganda</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.leoganda.net/simple-powershell-ftp/</guid>
		<description><![CDATA[With Powershell we can do FTP transaction really easy. The best feature from Powershell is we can use any dll library in our script, we can import .Net libraries and etc into our script. The script below is simple FTP to upload file to FTP server. In this script I&#8217;m using System.Net.WebClient to handle the [...]]]></description>
			<content:encoded><![CDATA[<p>With Powershell we can do FTP transaction really easy. The best feature from Powershell is we can use any dll library in our script, we can import .Net libraries and etc into our script. The script below is simple FTP to upload file to FTP server. In this script I&#8217;m using System.Net.WebClient to handle the file transfer.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #800080;">$ftpuser</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;user&quot;</span>
<span style="color: #800080;">$ftppass</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;12345&quot;</span>
<span style="color: #800080;">$ftpserver</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;localhost&quot;</span>
<span style="color: #800080;">$file</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;C:\test.txt&quot;</span>
<span style="color: #800080;">$filenewname</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;test.txt&quot;</span>
&nbsp;
<span style="color: #800080;">$webclient</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> System.Net.WebClient
<span style="color: #800080;">$ftp</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;ftp://&quot;</span><span style="color: pink;">+</span><span style="color: #800080;">$ftpuser</span><span style="color: pink;">+</span><span style="color: #800000;">&quot;:&quot;</span><span style="color: pink;">+</span><span style="color: #800080;">$ftppass</span><span style="color: pink;">+</span><span style="color: #800000;">&quot;@&quot;</span><span style="color: pink;">+</span><span style="color: #800080;">$ftpserver</span><span style="color: pink;">+</span><span style="color: #800000;">&quot;/&quot;</span><span style="color: pink;">+</span><span style="color: #800080;">$filenewname</span>
<span style="color: #800080;">$uri</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> System.Uri<span style="color: #000000;">&#40;</span><span style="color: #800080;">$ftp</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #800080;">$webclient</span>.UploadFile<span style="color: #000000;">&#40;</span><span style="color: #800080;">$uri</span><span style="color: pink;">,</span><span style="color: #800080;">$file</span><span style="color: #000000;">&#41;</span>﻿</pre></td></tr></table></div>

<h4>What people search:</h4><ul><li><a href="http://www.leoganda.net/simple-powershell-ftp/" title="powershell ftp upload">powershell ftp upload</a></li><li><a href="http://www.leoganda.net/simple-powershell-ftp/" title="powershell ftp">powershell ftp</a></li><li><a href="http://www.leoganda.net/simple-powershell-ftp/" title="powershell webclient ftp">powershell webclient ftp</a></li><li><a href="http://www.leoganda.net/simple-powershell-ftp/" title="powershell script ftp upload">powershell script ftp upload</a></li><li><a href="http://www.leoganda.net/simple-powershell-ftp/" title="system net webclient powershell ftp">system net webclient powershell ftp</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.leoganda.net/simple-powershell-ftp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

