<?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>gHacks technology news &#187; usb-virus-scan</title>
	<atom:link href="http://www.ghacks.net/tag/usb-virus-scan/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Tue, 24 Nov 2009 23:31:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Autostart programs when a usb drive is connected</title>
		<link>http://www.ghacks.net/2007/01/22/autostart-programs-when-a-usb-drive-is-connected/</link>
		<comments>http://www.ghacks.net/2007/01/22/autostart-programs-when-a-usb-drive-is-connected/#comments</comments>
		<pubDate>Mon, 22 Jan 2007 18:32:59 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[autostart]]></category>
		<category><![CDATA[freeware]]></category>
		<category><![CDATA[perform]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[usb-autostart]]></category>
		<category><![CDATA[usb-virus-scan]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/2007/01/22/autostart-programs-when-a-usb-drive-is-connected/</guid>
		<description><![CDATA[USB Virus Scan is a nice little command line utility that performs predefined operations if a usb drive is connected to your computer. It is able to distinguish between various drives which means that you can add custom operations for the drives that you own and a general option for drives that are not recognized. The tool uses the volume serial number of the drives to identify them and perform the operation.]]></description>
			<content:encoded><![CDATA[<p><a title="usb virus scan" target="_blank" href="http://didierstevens.wordpress.com/programs/usbvirusscan/">USB Virus Scan</a> is a nice little command line utility that performs predefined operations if a usb drive is connected to your computer. It is able to distinguish between various drives which means that you can add custom operations for the drives that you own and a general option for drives that are not recognized. The tool uses the volume serial number of the drives to identify them and perform the operation.</p>
<p>I can use the tool to start <a href="http://www.ghacks.net/tag/true-crypt/">true crypt</a> automatically when I insert my hard drive that has been encrypted by it, could start iTunes when I add my iPod and start a background virus scan if I, or someone else, connects a usb drive that is not known.  Please note that the user who is adding the usb device has full control over the system which means that he could abort everything that you autostart. (like a virus scan)</p>
<p><span id="more-1124"></span>The tool uses the following syntax which has to be added to a .bat file which has to be autostarted with windows.</p>
<p>USBVirusScan cmd /k %d:</p>
<p>A real example would look like the following. Say you do want to start the file antivirus.exe on drive c:\ whenever a usb device is connected. You would create a new bat file which is basically a text file with the .bat extension. Create the file test.bat in the same folder that usb virus scan resides. Add the following line to it.</p>
<p>USBVirusScan &#8220;c:\antivirus.exe&#8221; %d:</p>
<p>It is possible to add additional parameters. -c hides the command window, -i hides the tray icon, -e disables the exit menu.</p>
<p>I was not able to figure out how to create autostart entries that would use the volume name or volume serial number so I asked Didier the author of the software directly. The following paragraph is his answer to the question, thanks for being so quick to answer it Didier.</p>
<p>On my laptop, I have this entry in the Startup menu: &#8220;D:\Program Files\USBVirusScan\USBVirusScan.exe&#8221; wscript &#8220;D:\Program Files\USBVirusScan\tasks.vbs&#8221; %d %s &#8216;%v&#8217;  tasks.vbs will start TrueCrypt when I insert a USB-key with serial number &#8220;318606D2&#8243; to automatically mount the TrueCrypt volume on the USB-key. If it&#8217;s my MP3 player that is inserted (volume name PackardBell), 2xEplorer is launched. And in any other case, a virusscan is executed.  tasks.vbs:</p>
<p>dim WshShell</p>
<p>Set WshShell = WScript.CreateObject(&#8221;WScript.Shell&#8221;)</p>
<p>&#8216;wscript.echo Wscript.Arguments.Item(2)</p>
<p>if Wscript.Arguments.Item(1) = &#8220;318606D2&#8243; then     WshShell.run &#8220;&#8221;"D:\Program Files\TrueCrypt\TrueCrypt.exe&#8221;" /v &#8221; &#038; Wscript.Arguments.Item(0) &#038; &#8220;:\d1.tc /lz /q&#8221;, 1, true</p>
<p>elseif Wscript.Arguments.Item(2) = &#8220;&#8216;PackardBell&#8217;&#8221; then</p>
<p>WshShell.run &#8220;&#8221;"D:\Program Files\2xExplorer\2xExplorer.exe&#8221;" D:\MyDirsD\Temp\PodcastQueue &#8221; &#038; Wscript.Arguments.Item(0) &#038; &#8220;:\&#8221;, 1,</p>
<p>true</p>
<p>else</p>
<p>WshShell.run &#8220;&#8221;"D:\Program Files\Network Associates\VirusScan\csscan.exe&#8221;" /target &#8221; &#038; Wscript.Arguments.Item(0) &#038; &#8220;: /secure /quiet /log &#8220;&#8221;D:\Program Files\USBVirusScan\log.txt&#8221;"&#8221;, 1, true</p>
<p>end if</p>
<p>You would have to edit the path and serial volume number to make the script usable but I think it demonstrates the usage nicely.</p>

	Tags: <a href="http://www.ghacks.net/tag/action/" title="action" rel="tag">action</a>, <a href="http://www.ghacks.net/tag/autostart/" title="autostart" rel="tag">autostart</a>, <a href="http://www.ghacks.net/tag/freeware/" title="freeware" rel="tag">freeware</a>, <a href="http://www.ghacks.net/tag/perform/" title="perform" rel="tag">perform</a>, <a href="http://www.ghacks.net/tag/usb/" title="usb" rel="tag">usb</a>, <a href="http://www.ghacks.net/tag/usb-autostart/" title="usb-autostart" rel="tag">usb-autostart</a>, <a href="http://www.ghacks.net/tag/usb-virus-scan/" title="usb-virus-scan" rel="tag">usb-virus-scan</a>, <a href="http://www.ghacks.net/tag/windows/" title="Windows" rel="tag">Windows</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2006/03/20/xsite-freeware/" title="Xsite Freeware (March 20, 2006)">Xsite Freeware</a> (1)</li>
	<li><a href="http://www.ghacks.net/2007/03/30/weekend-fun-tails-gear/" title="Weekend Fun Tails Gear (March 30, 2007)">Weekend Fun Tails Gear</a> (1)</li>
	<li><a href="http://www.ghacks.net/2006/12/05/watch-tv-over-internet-with-sopcast/" title="Watch Tv over Internet with Sopcast (December 5, 2006)">Watch Tv over Internet with Sopcast</a> (3)</li>
	<li><a href="http://www.ghacks.net/2007/03/17/video-wallpapers-for-all-vista-versions/" title="Video Wallpapers for all Vista versions (March 17, 2007)">Video Wallpapers for all Vista versions</a> (17)</li>
	<li><a href="http://www.ghacks.net/2007/02/10/unknown-device-identifier/" title="Unknown Device Identifier (February 10, 2007)">Unknown Device Identifier</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2007/01/22/autostart-programs-when-a-usb-drive-is-connected/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
