<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://rayharwood.com/Wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://rayharwood.com/Wiki/index.php?action=history&amp;feed=atom&amp;title=ProcessShellRequest</id>
		<title>ProcessShellRequest - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://rayharwood.com/Wiki/index.php?action=history&amp;feed=atom&amp;title=ProcessShellRequest"/>
		<link rel="alternate" type="text/html" href="http://rayharwood.com/Wiki/index.php?title=ProcessShellRequest&amp;action=history"/>
		<updated>2026-11-06T05:25:59Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.3</generator>

	<entry>
		<id>http://rayharwood.com/Wiki/index.php?title=ProcessShellRequest&amp;diff=30&amp;oldid=prev</id>
		<title>Rayharwood at 14:03, 26 April 2013</title>
		<link rel="alternate" type="text/html" href="http://rayharwood.com/Wiki/index.php?title=ProcessShellRequest&amp;diff=30&amp;oldid=prev"/>
				<updated>2013-04-26T14:03:28Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:03, 26 April 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When doing a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;command line argument &lt;/del&gt;setup, here is code for processing the request&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When doing a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[Batch Mode and Command-Line Arguments]] &lt;/ins&gt;setup, here is code for processing the request&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&amp;#160; Each case selector calls the routine that actually does the work.&amp;#160; I typically build the work-code from an interactive GUI form with buttons, then strip the work-code from the button handler, place into a sub, call the sub from the button handler '''and''' from the ProcessShellRequest below.&amp;#160; That way, I can run the code in a batch file, but also still run it from the GUI if I need to do some &amp;quot;manual processing.&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; Private Function ProcessShellRequest(ByVal TheArgs() As String, ByVal TheSource As String) As ShellResult&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; Private Function ProcessShellRequest(ByVal TheArgs() As String, ByVal TheSource As String) As ShellResult&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rayharwood</name></author>	</entry>

	<entry>
		<id>http://rayharwood.com/Wiki/index.php?title=ProcessShellRequest&amp;diff=29&amp;oldid=prev</id>
		<title>Rayharwood at 13:59, 26 April 2013</title>
		<link rel="alternate" type="text/html" href="http://rayharwood.com/Wiki/index.php?title=ProcessShellRequest&amp;diff=29&amp;oldid=prev"/>
				<updated>2013-04-26T13:59:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:59, 26 April 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; Console.WriteLine(&amp;quot;Shell request = &amp;quot; &amp;amp; ShellRequest)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; Console.WriteLine(&amp;quot;Shell request = &amp;quot; &amp;amp; ShellRequest)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; Select Case ShellRequest&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; Select Case ShellRequest&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ' Some items removed from examples...&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;db&amp;quot;, &amp;quot;database&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;db&amp;quot;, &amp;quot;database&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LogDBinfo()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LogDBinfo()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; My.Settings.ITSec_ConnString_RunTime = My.Settings.ITSec_Test_ConnString&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; My.Settings.ITSec_ConnString_RunTime = My.Settings.ITSec_Test_ConnString&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LogDBinfo()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LogDBinfo()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;update_chn_managers&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Dim MyMgrUpdate As New CHN_Staff_MgrUpdate(LogFile)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; MyMgrUpdate.Process_CHN_Staff_Managers()&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;update_cmg_managers&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Dim MyMgrUpdate As New CMG_Staff_MgrUpdate(LogFile)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; MyMgrUpdate.Process_CMG_Staff_Managers()&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;send_queue_reminders&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SendQueueReminders_New_V2(LogFile)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;send_email_notices&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;send_email_notices&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Dim SEN As New EmailNotices&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Dim SEN As New EmailNotices&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SEN.Send_Email_Notices(LogFile)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; SEN.Send_Email_Notices(LogFile)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;run_status_updates&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; RunBothStatusUpdates(LogFile)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;scan_for_exceptions&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Dim ExcScan As New ExceptionScanner(LogFile)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ExcScan.Scan_For_All_Exceptions()&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;set_update_flag&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Process_Set_Update_Flag(ArgArray)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;get_active_imports&amp;quot;, &amp;quot;run_active_imports&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;get_active_imports&amp;quot;, &amp;quot;run_active_imports&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Process_Run_Active_Imports(ArgArray)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Process_Run_Active_Imports(ArgArray)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;run_import&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Process_Run_Import(ArgArray)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;copy_safdb&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Process_Copy_SAFDB()&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;get_exchange_info&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Process_Get_Exchange_Info(ArgArray)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;get_ad_account_info&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Case &amp;quot;get_ad_account_info&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Process_Get_AD_Account_Info(ArgArray)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Process_Get_AD_Account_Info(ArgArray)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rayharwood</name></author>	</entry>

	<entry>
		<id>http://rayharwood.com/Wiki/index.php?title=ProcessShellRequest&amp;diff=28&amp;oldid=prev</id>
		<title>Rayharwood: Created page with &quot;When doing a command line argument setup, here is code for processing the request:      Private Function ProcessShellRequest(ByVal TheArgs() As String, ByVal TheSource As Stri...&quot;</title>
		<link rel="alternate" type="text/html" href="http://rayharwood.com/Wiki/index.php?title=ProcessShellRequest&amp;diff=28&amp;oldid=prev"/>
				<updated>2013-04-26T13:57:11Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;When doing a command line argument setup, here is code for processing the request:      Private Function ProcessShellRequest(ByVal TheArgs() As String, ByVal TheSource As Stri...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;When doing a command line argument setup, here is code for processing the request:&lt;br /&gt;
&lt;br /&gt;
    Private Function ProcessShellRequest(ByVal TheArgs() As String, ByVal TheSource As String) As ShellResult&lt;br /&gt;
        Dim ArgArray As List(Of String) = New List(Of String)&lt;br /&gt;
        ArgArray.Clear()&lt;br /&gt;
        Dim StartArg As Integer&lt;br /&gt;
        If Not RunningBatchFile Then  ''UserInteractive AndAlso&lt;br /&gt;
            StartArg = 1  ' If interactive, ignore first item (exe file)&lt;br /&gt;
        Else&lt;br /&gt;
            StartArg = 0  ' otherwise, batch mode starts with command&lt;br /&gt;
        End If&lt;br /&gt;
        'StartArg = 1 'HACK: try this to see if it works better...&lt;br /&gt;
        LogFile.LogEntry(&amp;quot;Command line arg count passed to ProcessShellRequest= &amp;quot; &amp;amp; My.Application.CommandLineArgs.Count)&lt;br /&gt;
        For ArgCount = StartArg To TheArgs.Length - 1&lt;br /&gt;
            Dim Arg As String = TheArgs(ArgCount)&lt;br /&gt;
            LogFile.LogEntry(&amp;quot;Command line arg &amp;quot; &amp;amp; ArgCount &amp;amp; &amp;quot; = &amp;quot; &amp;amp; Arg)&lt;br /&gt;
            ArgArray.Add(Arg)&lt;br /&gt;
        Next&lt;br /&gt;
        If ArgArray.Count = 0 Then&lt;br /&gt;
            System.Environment.ExitCode = QuietMode_ExitCode.No_Arg0_Present ' Indicate shell started with no Args&lt;br /&gt;
            LogFile.LogEntry(&amp;quot;Exiting due to no Arg present, ExitCode = &amp;quot; &amp;amp; QuietMode_ExitCode.No_Arg0_Present)&lt;br /&gt;
            Exit Function&lt;br /&gt;
        End If&lt;br /&gt;
        Dim ShellRequest As String = LCase(ArgArray(0))&lt;br /&gt;
        ' Note: ALL &amp;quot;case&amp;quot; selections below MUST be LOWERCASE!&lt;br /&gt;
        LogFile.LogEntry(&amp;quot;Shell request = &amp;quot; &amp;amp; ShellRequest)&lt;br /&gt;
        Console.WriteLine(&amp;quot;Shell request = &amp;quot; &amp;amp; ShellRequest)&lt;br /&gt;
        Select Case ShellRequest&lt;br /&gt;
            Case &amp;quot;db&amp;quot;, &amp;quot;database&amp;quot;&lt;br /&gt;
                LogDBinfo()&lt;br /&gt;
            Case &amp;quot;test&amp;quot;, &amp;quot;testdb&amp;quot;&lt;br /&gt;
                ' Defaults to Live DB... this sets to Test&lt;br /&gt;
                My.Settings.ITSec_ConnString_RunTime = My.Settings.ITSec_Test_ConnString&lt;br /&gt;
                LogDBinfo()&lt;br /&gt;
            Case &amp;quot;update_chn_managers&amp;quot;&lt;br /&gt;
                Dim MyMgrUpdate As New CHN_Staff_MgrUpdate(LogFile)&lt;br /&gt;
                MyMgrUpdate.Process_CHN_Staff_Managers()&lt;br /&gt;
            Case &amp;quot;update_cmg_managers&amp;quot;&lt;br /&gt;
                Dim MyMgrUpdate As New CMG_Staff_MgrUpdate(LogFile)&lt;br /&gt;
                MyMgrUpdate.Process_CMG_Staff_Managers()&lt;br /&gt;
            Case &amp;quot;send_queue_reminders&amp;quot;&lt;br /&gt;
                SendQueueReminders_New_V2(LogFile)&lt;br /&gt;
            Case &amp;quot;send_email_notices&amp;quot;&lt;br /&gt;
                Dim SEN As New EmailNotices&lt;br /&gt;
                SEN.Send_Email_Notices(LogFile)&lt;br /&gt;
            Case &amp;quot;run_status_updates&amp;quot;&lt;br /&gt;
                RunBothStatusUpdates(LogFile)&lt;br /&gt;
            Case &amp;quot;scan_for_exceptions&amp;quot;&lt;br /&gt;
                Dim ExcScan As New ExceptionScanner(LogFile)&lt;br /&gt;
                ExcScan.Scan_For_All_Exceptions()&lt;br /&gt;
            Case &amp;quot;set_update_flag&amp;quot;&lt;br /&gt;
                Process_Set_Update_Flag(ArgArray)&lt;br /&gt;
            Case &amp;quot;get_active_imports&amp;quot;, &amp;quot;run_active_imports&amp;quot;&lt;br /&gt;
                Process_Run_Active_Imports(ArgArray)&lt;br /&gt;
            Case &amp;quot;run_import&amp;quot;&lt;br /&gt;
                Process_Run_Import(ArgArray)&lt;br /&gt;
            Case &amp;quot;copy_safdb&amp;quot;&lt;br /&gt;
                Process_Copy_SAFDB()&lt;br /&gt;
            Case &amp;quot;get_exchange_info&amp;quot;&lt;br /&gt;
                Process_Get_Exchange_Info(ArgArray)&lt;br /&gt;
            Case &amp;quot;get_ad_account_info&amp;quot;&lt;br /&gt;
                Process_Get_AD_Account_Info(ArgArray)&lt;br /&gt;
            Case &amp;quot;do_special_processing_org&amp;quot;&lt;br /&gt;
                DoSpecialProcessing.Process_Special_Organization_Data(LogFile)&lt;br /&gt;
            Case &amp;quot;ignore&amp;quot;&lt;br /&gt;
                ' yep, do nothing here...&lt;br /&gt;
                LogFile.LogEntry(&amp;quot;&amp;quot;&amp;quot;Ignore&amp;quot;&amp;quot; - no additional action taken&amp;quot;)&lt;br /&gt;
            Case &amp;quot;runbatch&amp;quot;&lt;br /&gt;
                LogFile.LogEntry(&amp;quot;&amp;quot;&amp;quot;RunBatch&amp;quot;&amp;quot; - setting up batch file...&amp;quot;)&lt;br /&gt;
                ProcessBatch(ArgArray(1))&lt;br /&gt;
            Case &amp;quot;stop&amp;quot;&lt;br /&gt;
                LogFile.LogEntry(&amp;quot;&amp;quot;&amp;quot;Stop&amp;quot;&amp;quot; - stopping any batch file in progress...&amp;quot;)&lt;br /&gt;
                ' This is here primarily for early-exit of batch files&lt;br /&gt;
                Return ShellResult.Shell_Stop&lt;br /&gt;
                Exit Function&lt;br /&gt;
            Case Else&lt;br /&gt;
                LogFile.LogEntry(&amp;quot;Exiting due to unrecognized Arg0, ExitCode = &amp;quot; &amp;amp; QuietMode_ExitCode.Unknown_Arg0)&lt;br /&gt;
                System.Environment.ExitCode = QuietMode_ExitCode.Unknown_Arg0 ' Indicate shell started with Bad Arg(0)&lt;br /&gt;
                Return ShellResult.Shell_Error&lt;br /&gt;
                Exit Function&lt;br /&gt;
        End Select&lt;br /&gt;
        Return ShellResult.Shell_OK&lt;br /&gt;
        'Rely on calling routine to exit form and shut down...&lt;br /&gt;
    End Function&lt;/div&gt;</summary>
		<author><name>Rayharwood</name></author>	</entry>

	</feed>