<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Is there a batch file command that closes a dialog box?</title>
	<link>http://ask.metafilter.com/82107/Is-there-a-batch-file-command-that-closes-a-dialog-box/</link>
	<description>Comments on Ask MetaFilter post Is there a batch file command that closes a dialog box?</description>
	<pubDate>Sun, 27 Jan 2008 18:17:51 -0800</pubDate>
	<lastBuildDate>Sun, 27 Jan 2008 18:17:51 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Is there a batch file command that closes a dialog box?</title>
		<link>http://ask.metafilter.com/82107/Is-there-a-batch-file-command-that-closes-a-dialog-box</link>	
		<description>For windows batch files, is there a way to automatically close dialog boxes that open as a result of a windows program producing an error? &lt;br /&gt;&lt;br /&gt; I&apos;m struggling trying to write a batch file for windows 2000 which does a variety of things on an hourly basis, one of which is to start a windows program to run.&lt;br&gt;
That program goes out on the internet and makes some checks, and the batch file works fine for that.  The problem is when the computer loses an internet connection for some reason, the program cannot complete it&apos;s internet check and produces a single dialog indicating it couldn&apos;t connect, with one &quot;OK&quot; button on it. At that point the batch file hangs, because I have other events in the batch file which must occur, and they can&apos;t complete because I had to use the start and wait switch like this:&lt;br&gt;
Start /wait &quot;&quot; &quot;windows program.exe&quot; /run&lt;br&gt;
which forces the batch file to wait until the window program finishes execution, and only then continues to the next line of the batch file.  If I can just get the batch file to automatically close the error dialog, then the batch file can proceed normally as I want.&lt;br&gt;
I&apos;m fairly sure I&apos;ll need some sort of IF THEN statement to get this to work, but this is my first time trying to write a somewhat complicated batch file, and I&apos;m not sure about how to integrate an IF THEN statement with some command to close that error dialog if it appears.&lt;br&gt;
Anybody have any experience in batch files and can lend me some ideas?&lt;br&gt;
Thanks.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.82107</guid>
		<pubDate>Sun, 27 Jan 2008 18:14:59 -0800</pubDate>
		<dc:creator>jldindc</dc:creator>
		
			<category>Batch</category>
		
			<category>windows</category>
		
			<category>automation</category>
		
	</item> <item>
		<title>By: aubilenon</title>
		<link>http://ask.metafilter.com/82107/Is-there-a-batch-file-command-that-closes-a-dialog-box#1216301</link>	
		<description>You can&apos;t do that from batch, but you can use some other tools to do this kind of thing.  &lt;a href=&quot;http://www.dialogdevil.com/index.php&quot;&gt;Dialog Devil&lt;/a&gt; looks like it might do the trick. It says it costs money but there&apos;s a &quot;download&quot; link which looks like you can demo it.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.82107-1216301</guid>
		<pubDate>Sun, 27 Jan 2008 18:17:51 -0800</pubDate>
		<dc:creator>aubilenon</dc:creator>
	</item><item>
		<title>By: mattdini</title>
		<link>http://ask.metafilter.com/82107/Is-there-a-batch-file-command-that-closes-a-dialog-box#1216310</link>	
		<description>You could have the batch file try to ping a known good host on the internet, then only if it can, run the other program.  &lt;br&gt;
&lt;br&gt;
Or, give &lt;a href=&quot;http://www.autoitscript.com/autoit3/&quot;&gt;AutoIT &lt;/a&gt;a try.. a great scripting language with tons of windows support.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.82107-1216310</guid>
		<pubDate>Sun, 27 Jan 2008 18:29:13 -0800</pubDate>
		<dc:creator>mattdini</dc:creator>
	</item><item>
		<title>By: jeffamaphone</title>
		<link>http://ask.metafilter.com/82107/Is-there-a-batch-file-command-that-closes-a-dialog-box#1216547</link>	
		<description>Does &quot;windows program.exe&quot; happen to have a quite option?  Such as /q?  Most things that are meant to run from the command line do...</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.82107-1216547</guid>
		<pubDate>Sun, 27 Jan 2008 23:04:23 -0800</pubDate>
		<dc:creator>jeffamaphone</dc:creator>
	</item><item>
		<title>By: ph00dz</title>
		<link>http://ask.metafilter.com/82107/Is-there-a-batch-file-command-that-closes-a-dialog-box#1216660</link>	
		<description>Yeah... seconding autoit. That thing is rad for scripting on windows, especially for dealing with other programs and dialog boxes.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.82107-1216660</guid>
		<pubDate>Mon, 28 Jan 2008 05:37:29 -0800</pubDate>
		<dc:creator>ph00dz</dc:creator>
	</item><item>
		<title>By: gjc</title>
		<link>http://ask.metafilter.com/82107/Is-there-a-batch-file-command-that-closes-a-dialog-box#1217627</link>	
		<description>Yeah, the simplest solution is to see if that program has a /quiet or a /y type of option that will keep it quiet.&lt;br&gt;
&lt;br&gt;
Use the &apos;start&apos; command to call the program.  type start /? to get all the options.  This will start whatever program it is and continue processing the rest of the batch file without waiting for the first one to finish.&lt;br&gt;
&lt;br&gt;
Example:&lt;br&gt;
&lt;em&gt;&lt;br&gt;
&lt;strong&gt;&lt;br&gt;
notepad.exe&lt;br&gt;
calc.exe&lt;br&gt;
&lt;/strong&gt;&lt;br&gt;
&lt;/em&gt;&lt;br&gt;
Put that into test.bat and run it.  Notepad will run.  When you close it, calculator will run.&lt;br&gt;
&lt;br&gt;
However:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;&lt;strong&gt;&lt;br&gt;
start notepad.exe&lt;br&gt;
start calc.exe&lt;/strong&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Will start them both and close the batch window instantly.&lt;br&gt;
&lt;br&gt;
And:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;em&gt;start notepad.exe&lt;br&gt;
calc.exe&lt;br&gt;
&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Will start notepad and calc instantly, but will leave the batch window open until you close calculator.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.82107-1217627</guid>
		<pubDate>Mon, 28 Jan 2008 18:26:36 -0800</pubDate>
		<dc:creator>gjc</dc:creator>
	</item>
	</channel>
</rss>
