<?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>VBScript &#8211; Quan Tran</title>
	<atom:link href="https://qtran.info/category/scripting-tips/vbs-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>https://qtran.info</link>
	<description></description>
	<lastBuildDate>Wed, 17 Oct 2018 07:53:10 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>

<image>
	<url>https://qtran.info/wp-content/uploads/2018/10/cropped-logo-2-32x32.jpg</url>
	<title>VBScript &#8211; Quan Tran</title>
	<link>https://qtran.info</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Paste from Clipboard</title>
		<link>https://qtran.info/paste-from-clipboard/</link>
		
		<dc:creator><![CDATA[quan3t]]></dc:creator>
		<pubDate>Wed, 17 Oct 2018 07:44:58 +0000</pubDate>
				<category><![CDATA[VBScript]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[Script will paste from clipboard to a file. Set objHTML = CreateObject(&#8220;htmlfile&#8221;) ClipboardText = objHTML.ParentWindow.ClipboardData.GetData(&#8220;text&#8221;) path = &#8220;C:/temp_t.txt&#8221; Set objFSO = CreateObject(&#8220;Scripting.FileSystemObject&#8221;) Set objFile = objFSO.OpenTextFile(path, 2, true) objFile.WriteLine ClipboardText objFile.Close]]></description>
										<content:encoded><![CDATA[<p>Script will paste from clipboard to a file.</p>
<blockquote><p>Set objHTML = CreateObject(&#8220;htmlfile&#8221;)<br />
ClipboardText = objHTML.ParentWindow.ClipboardData.GetData(&#8220;text&#8221;)<br />
path = &#8220;C:/temp_t.txt&#8221;<br />
Set objFSO = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)<br />
Set objFile = objFSO.OpenTextFile(path, 2, true)<br />
objFile.WriteLine ClipboardText<br />
objFile.Close</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automate RSA SecurID token authentication</title>
		<link>https://qtran.info/automate-rsa-securid-token-authentication/</link>
		
		<dc:creator><![CDATA[quan3t]]></dc:creator>
		<pubDate>Wed, 17 Oct 2018 07:42:49 +0000</pubDate>
				<category><![CDATA[VBScript]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[Script to automatic RSA SecurID token authentication by opening up RSA, send the PIN, then copy the token and close RSA. &#8216; Opens RSA SecurID application, sends out the PIN code and then closes it &#8216; Kill current open process myProcess=&#8221;SecurID.exe&#8221; Set Processes = GetObject(&#8220;winmgmts:&#8221;).InstancesOf(&#8220;Win32_Process&#8221;) For Each Process In Processes If StrComp(Process.Name, myProcess, vbTextCompare) = 0 Then Process.Terminate() End If Next &#8216; Main code SecApp = &#8220;C:\Program Files (x86)\RSA SecurID Software Token\SecurID.exe&#8221; Set SecObj = CreateObject(&#8220;WScript.Shell&#8221;) SecObj.Exec(SecApp) WScript.Sleep 1000 MySendKeys(&#8220;12345&#8221;) [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Script to automatic RSA SecurID token authentication by opening up RSA, send the PIN, then copy the token and close RSA.</p>
<blockquote><p>&#8216; Opens RSA SecurID application, sends out the PIN code and then closes it</p>
<p>&#8216; Kill current open process<br />
myProcess=&#8221;SecurID.exe&#8221;<br />
Set Processes = GetObject(&#8220;winmgmts:&#8221;).InstancesOf(&#8220;Win32_Process&#8221;)<br />
For Each Process In Processes<br />
If StrComp(Process.Name, myProcess, vbTextCompare) = 0 Then<br />
Process.Terminate()<br />
End If<br />
Next</p>
<p>&#8216; Main code<br />
SecApp = &#8220;C:\Program Files (x86)\RSA SecurID Software Token\SecurID.exe&#8221;<br />
Set SecObj = CreateObject(&#8220;WScript.Shell&#8221;)<br />
SecObj.Exec(SecApp)<br />
WScript.Sleep 1000<br />
MySendKeys(&#8220;12345&#8221;) &#8216;send PIN<br />
MySendKeys(&#8220;{ENTER}&#8221;)<br />
MySendKeys(&#8220;^{c}&#8221;) &#8216;send CTRL+C<br />
MySendKeys(&#8220;%{F4}&#8221;)</p>
<p>&#8216; Function to sendkeys<br />
Function MySendKeys(keys)<br />
SecObj.AppActivate(SecApp)<br />
WScript.Sleep 250<br />
SecObj.SendKeys(keys)<br />
End Function</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Terminate a running process</title>
		<link>https://qtran.info/terminate-an-open-process/</link>
		
		<dc:creator><![CDATA[quan3t]]></dc:creator>
		<pubDate>Wed, 17 Oct 2018 07:35:44 +0000</pubDate>
				<category><![CDATA[VBScript]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[Script to terminal an open processes. &#8216; Kill current open process myProcess=&#8221;Something.exe&#8221; Set Processes = GetObject(&#8220;winmgmts:&#8221;).InstancesOf(&#8220;Win32_Process&#8221;) For Each Process In Processes If StrComp(Process.Name, myProcess, vbTextCompare) = 0 Then Process.Terminate() End If Next]]></description>
										<content:encoded><![CDATA[<p>Script to terminal an open processes.</p>
<blockquote><p>&#8216; Kill current open process<br />
myProcess=&#8221;Something.exe&#8221;<br />
Set Processes = GetObject(&#8220;winmgmts:&#8221;).InstancesOf(&#8220;Win32_Process&#8221;)<br />
For Each Process In Processes<br />
If StrComp(Process.Name, myProcess, vbTextCompare) = 0 Then<br />
Process.Terminate()<br />
End If<br />
Next</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
