<?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>MCB Systems &#187; zenith</title>
	<atom:link href="http://www.mcbsys.com/techblog/tag/zenith/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mcbsys.com/techblog</link>
	<description>Custom Software and I.T. Services</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:58:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Deploy Microsoft Zero-Day Patch with a Zenith Job</title>
		<link>http://www.mcbsys.com/techblog/2009/07/deploy-microsoft-zero-day-patch-with-a-zenith-job/</link>
		<comments>http://www.mcbsys.com/techblog/2009/07/deploy-microsoft-zero-day-patch-with-a-zenith-job/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 14:58:44 +0000</pubDate>
		<dc:creator>Mark Berry</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[0day]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[zenith]]></category>

		<guid isPermaLink="false">/mark/post/Deploy-Microsoft-Zero-Day-Patch-with-a-Zenith-Job.aspx</guid>
		<description><![CDATA[Yesterday, Microsoft released this security advisory:
Vulnerability in Microsoft Video ActiveX control could allow remote code execution
That article includes a &#8220;Fix it&#8221; link that users can click on to disable the exploited ActiveX objects in Internet Explorer. The link downloads a small installer file which users can only execute if they are logged on as administrators. [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, Microsoft released this security advisory:</p>
<p><a href="http://support.microsoft.com/kb/972890" target="_blank">Vulnerability in Microsoft Video ActiveX control could allow remote code execution</a>
<p>That article includes a &#8220;Fix it&#8221; link that users can click on to disable the exploited ActiveX objects in Internet Explorer. The link downloads a small installer file which users can only execute if they are logged on as administrators. So deploying using that link would require that an administrator log on to each computer, including servers, and run the installer. </p>
<p>How can I quickly deploy this patch to all systems that I manage? I could follow the instructions in the related <a href="http://www.microsoft.com/technet/security/advisory/972890.mspx" target="_blank">TechNet article</a> to manually set up a .reg file, then deploy that with logon scripts or group policy. That article at least confirms that the fix is changing HKEY_LOCAL_MACHINE entries, so it&#8217;s not user-specific. I decided instead to deploy the installer using a <a href="http://www.zenithinfotech.com" target="_blank">Zenith</a> job. Here&#8217;s how.</p>
<p><span id="more-38"></span></p>
<h1>1. Make the Install File Accessible</h1>
<p>1a. Download the 645KB MicrosoftFixit50287.msi from the article above.<br />
1b. Upload it to a publicly-available web address.</p>
<h1>2. Set Up the Zenith Job</h1>
<p>2a. If you don&#8217;t have a Global Distribution Point in Zenith yet, define one. In the Zenith portal, go to Job Management > Script Management > Distribution Points > Global and click on Create DP. Set up a link pointing to the location where you stored the file in step 1b:<br />
&#160;<br />
<img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="400" alt="ZenithJob1" src="http://www.mcbsys.com/techblog/wp-content/uploads/WindowsLiveWriter/ApplyMicrosoftZeroDayPatchwithaZenithJob_C469/ZenithJob1_3.png" width="506" border="0"> </p>
<p>2b. Define the Zenith job. In the Zenith portal, go to Job Management > Script Management > Scripts > Global and click on Create Script. Fill in the fields as shown below. </p>
<ul>
<li>Choose any Category you like, or create your own.</li>
<li>For the Distribution Point, select the location you defined in 2a.</li>
<li>Make sure you put &#8220;MicrosoftFixit50287.msi&#8221; in both the Executable File and the Additional Files boxes.</li>
<li>Make sure to specify the &#8220;/quiet&#8221; command line parameter, or the job will fail because no user interaction is possible.</li>
</ul>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="545" alt="ZenithJob2" src="http://www.mcbsys.com/techblog/wp-content/uploads/WindowsLiveWriter/ApplyMicrosoftZeroDayPatchwithaZenithJob_C469/ZenithJob2_3.png" width="644" border="0"> </p>
<h1>3. Deploy the Job</h1>
<p>You can deploy the script on one site or several. </p>
<p>3a. For testing, in the Zenith portal, go to Job Management > Script Management > Execute Scripts > Global, choose the Category you selected, choose the script, and follow the wizard to deploy it to one or two machines. </p>
<p>3b. After 15-30 minutes, in the Zenith portal, go to Job Management > Script Mgmt Report > Site Wise and check the execution status. When your test machines show &#8220;Success&#8221;, check the Event Log on the test machines. You should see the following success event in the Application Event Log:</p>
<p>Event Type:&#160;&#160;&#160; Information<br />
Event Source:&#160;&#160;&#160; MsiInstaller<br />
Event Category:&#160;&#160;&#160; None<br />
Event ID:&#160;&#160;&#160; 11707<br />
Date:&#160;&#160;&#160;&#160;&#160;&#160;&#160; 7/7/2009<br />
Time:&#160;&#160;&#160;&#160;&#160;&#160;&#160; 12:11:00 PM<br />
User:&#160;&#160;&#160;&#160;&#160;&#160;&#160; NT AUTHORITY\SYSTEM<br />
Computer:&#160;&#160;&#160; TESTMACHINE<br />
Description:&#160; Product: Microsoft Fix it 50287 &#8212; Installation completed successfully.
<p>3c. Deploy globally. In the Zenith portal, go to Job Management > Script Management > Multi Site Job Deployment > Global Script, choose the script, and follow the wizard to deploy it to all Server and Desktop machines. (I didn&#8217;t see any issues when I re-deployed it to my test machines.) Set the time period long enough that it will include machines that are currently turned off. Your job definition should look something like this:</p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="456" alt="ZenithJob3" src="http://www.mcbsys.com/techblog/wp-content/uploads/WindowsLiveWriter/ApplyMicrosoftZeroDayPatchwithaZenithJob_C469/ZenithJob3_5.png" width="665" border="0"></p>
<p>3d. Follow job progress. In the Zenith portal, go to Job Management > Script Management > Delete Scheduled Jobs. Under Multi Site Job Deployment: Scheduled Job Details, click on the job to see a list of all machines and their statuses. Once all the jobs complete, they will no longer be listed under Delete Scheduled Jobs; you&#8217;ll have to check individual sites under the Script Mgmt Report section.</p>
<h1>Bigger Jobs</h1>
<p>If you want to deploy other software with larger install packages, you may want to use local FTP distribution points rather than a global distribution point. I blogged about that <a href="http://blogs.mcbsys.com/mark/post/Deploy-Software-with-a-Custom-Zenith-Job.aspx" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mcbsys.com/techblog/2009/07/deploy-microsoft-zero-day-patch-with-a-zenith-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excluding HTTP Sites from NOD32 Version 3.0</title>
		<link>http://www.mcbsys.com/techblog/2009/06/excluding-http-sites-from-nod32-version-3-0/</link>
		<comments>http://www.mcbsys.com/techblog/2009/06/excluding-http-sites-from-nod32-version-3-0/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 19:00:52 +0000</pubDate>
		<dc:creator>Mark Berry</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[antivirus]]></category>
		<category><![CDATA[exclusion]]></category>
		<category><![CDATA[nod32]]></category>
		<category><![CDATA[zenith]]></category>

		<guid isPermaLink="false">/mark/post/Excluding-HTTP-Sites-from-NOD32-Version-30.aspx</guid>
		<description><![CDATA[I&#8217;m running NOD32 Antivirus Business Edition version 3.0.684.0.
Zenith Infotech monitoring sometimes downloads files that trip NOD32&#8217;s HTTP filter (e.g. SpyBot and BitDefender executables). Zenith recommends excluding &#8220;update.itsupport247.net&#8221; from antivirus scanning. It&#8217;s not hard to do in NOD32, but it is hard to find someone who knows how to do it!

Here&#8217;s the basic procedure:

Open the NOD32 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m running NOD32 Antivirus Business Edition version 3.0.684.0.</p>
<p>Zenith Infotech monitoring sometimes downloads files that trip NOD32&#8217;s HTTP filter (e.g. SpyBot and BitDefender executables). Zenith recommends excluding &#8220;update.itsupport247.net&#8221; from antivirus scanning. It&#8217;s not hard to do in NOD32, but it is hard to find someone who knows how to do it!</p>
<p><span id="more-39"></span></p>
<p>Here&#8217;s the basic procedure:</p>
<ol>
<li>Open the NOD32 client interface and press F5 to load the Advanced dialog. Navigate to Antivirus and antispyware > Web access protection > HTTP > Excluded addresses. </li>
<li>Add &#8220;update.itsupport247.net/*&#8221; to the list.</li>
</ol>
<p><strong>Note:</strong>&#160; do not put &#8220;http://&#8221; in front of the address, but <em>do</em> put &#8220;/* &#8221; after it! If you forget the &#8220;/*&#8221;, the exclusion won&#8217;t work:&#160; NOD32 will block Zenith from downloading files.</p>
<p><a href="http://www.mcbsys.com/techblog/wp-content/uploads/WindowsLiveWriter/ExcludingHTTPSitesfromNOD32Version3.0_10B3F/NOD32%20Client%20HTTP%20exclusion_2.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="178" alt="NOD32 Client HTTP exclusion" src="http://www.mcbsys.com/techblog/wp-content/uploads/WindowsLiveWriter/ExcludingHTTPSitesfromNOD32Version3.0_10B3F/NOD32%20Client%20HTTP%20exclusion_thumb.png" width="244" border="0" /></a> </p>
<h1>Deploy Using ESET Remote Administrator Console</h1>
<p>Want to deploy that from a configuration file? Here is where things really get strange.</p>
<p>First, even though you don&#8217;t own the firewall product, to set up an HTTP exclusion, open the ESET Configuration Editor and navigate to ESET Smart Security, ESET NOD32 Antivirus > Personal firewall > Setup > List of URL addresses excluded from filtering. Click on Edit to add &#8220;update.itsupport247.net/*&#8221;.</p>
<p><a href="http://www.mcbsys.com/techblog/wp-content/uploads/WindowsLiveWriter/ExcludingHTTPSitesfromNOD32Version3.0_10B3F/NOD32%20Config%20Editor%20HTTP%20exclusion_2.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="199" alt="NOD32 Config Editor HTTP exclusion" src="http://www.mcbsys.com/techblog/wp-content/uploads/WindowsLiveWriter/ExcludingHTTPSitesfromNOD32Version3.0_10B3F/NOD32%20Config%20Editor%20HTTP%20exclusion_thumb.png" width="244" border="0" /></a> </p>
<p>The problem is, when you deploy that, the exclusion will not show up in the client&#8217;s user interface if that client has never had an HTTP exclusion. However, if you <em>first</em> set up <em>any</em> HTTP exclusion on the client, <em>then</em> deploy the correct exclusion from the ESET Remote Administrator Console, the correct exclusion will appear on the client.</p>
<p>I have not been able to figure out why the exclusions don&#8217;t appear until one is first added to the client. But hopefully, with that annoying manual effort, the exclusion will at least work and allow the clients to download the Zenith updates as necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mcbsys.com/techblog/2009/06/excluding-http-sites-from-nod32-version-3-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Deploy Software with a Custom Zenith Job</title>
		<link>http://www.mcbsys.com/techblog/2009/05/deploy-software-with-a-custom-zenith-job/</link>
		<comments>http://www.mcbsys.com/techblog/2009/05/deploy-software-with-a-custom-zenith-job/#comments</comments>
		<pubDate>Fri, 22 May 2009 19:48:52 +0000</pubDate>
		<dc:creator>Mark Berry</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[zenith]]></category>

		<guid isPermaLink="false">/mark/post/Deploy-Software-with-a-Custom-Zenith-Job.aspx</guid>
		<description><![CDATA[The Zenith Infotech SAAZ platform includes a Job functionality that can be used to create custom software deployment jobs. This function is simpler, and thus less powerful, than A.S.E. scripting, but it can be useful for deploying software to multiple computers at a site, for example.
Zenith provides a decent Job Management Training Guide in PDF [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.zenithinfotech.com" target="_blank">Zenith Infotech</a> SAAZ platform includes a Job functionality that can be used to create custom software deployment jobs. This function is simpler, and thus less powerful, than A.S.E. scripting, but it can be useful for deploying software to multiple computers at a site, for example.</p>
<p>Zenith provides a decent <em>Job Management Training Guide</em> in PDF format on their partner portal. I just wanted to note a couple things I didn&#8217;t see documented:</p>
<p><span id="more-40"></span></p>
<ul>
<li>Jobs run on a local machine as LOCAL SYSTEM. This account does not have direct network access even to servers on the local network. So if you write a batch file hoping to run an executable from a network share, it will fail with Access Denied (even though the portal will say that it succeeded).</li>
<li>You could set up a central server to host all updates, but that would mean downloading the update across the wire for each computer. I wanted to use the client&#8217;s local server instead. I decided to set up an FTP site on the server with the following restrictions:
<ul>
<li>Use a custom port, e.g. 7214. Do not open this port on the external firewall.</li>
<li>Point to a local folder, e.g. <code>D:\FTPDeploy</code>.</li>
<li>Anonymous access only.</li>
<li>Read access only.</li>
<li>Deny access to all computers except local subnet, e.g. 192.168.1.1/255.255.255.0.</li>
</ul>
</li>
</ul>
<p>Once the FTP site is set up, you&#8217;re ready to work in the Zenith portal:</p>
<ol>
<li>Set up a site-specific job distribution point. The server address is the internal IP of the server plus the port, e.g. ftp://192.168.1.2:7214.</li>
<li>Set up the script. For example, let&#8217;s say you&#8217;ve set up the required <a href="http://www.adobe.com/products/reader/rdr_distribution1.html" target="_blank">distribution agreement</a> with Adobe and created a custom setup for Adobe Reader using the <a href="http://www.adobe.com/devnet/acrobat/enterprise_deployment.html" target="_blank">Adobe Customization Wizard</a>. You&#8217;ll have about six files that are needed for the installation. Copy those files files into a subfolder of <code>D:\FTPDeploy</code>, e.g. <code>CustomAcroRead</code>. Then create a site-specific script in the Zenith portal using the following values:</li>
</ol>
<p style="padding-left: 30px;">Distribution Point:&nbsp; the FTP distribution point you created above</p>
<p style="padding-left: 30px;">Executable File:&nbsp; <code>setup.exe</code> (the bootstrap file that Adobe runs to start the custom installation)</p>
<p style="padding-left: 30px;">Additional Files to be downloaded:&nbsp; <code>CustomAcroRead\*.*</code></p>
<p style="padding-left: 30px;">Command Line Parameters:&nbsp; (leave blank&#8211;the Acrobat Reader installer doesn&#8217;t need any parameters)</p>
<p>The Additional Files line is the trick:&nbsp; it tells the ZDeploy process to download all the files in the <code>CustomAcroRead</code> subfolder to the local computer&#8217;s <code>C:\Program Files\SAAZOD\Executables</code> folder. Once they are there, it will run the Execute File specified. Do <em>not</em> add the <code>CustomAcroRead</code> subfolder before the Executable File&#8217;s name or the executable will not be found.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mcbsys.com/techblog/2009/05/deploy-software-with-a-custom-zenith-job/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Run CMD as LOCAL SYSTEM User</title>
		<link>http://www.mcbsys.com/techblog/2009/05/run-cmd-as-local-system-user/</link>
		<comments>http://www.mcbsys.com/techblog/2009/05/run-cmd-as-local-system-user/#comments</comments>
		<pubDate>Fri, 22 May 2009 17:24:00 +0000</pubDate>
		<dc:creator>Mark Berry</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[zenith]]></category>

		<guid isPermaLink="false">/mark/post/Run-CMD-as-LOCAL-SYSTEM-User.aspx</guid>
		<description><![CDATA[
Zenith Infotech&#39;s SAAZ platform allow you to set up jobs to run on client machine, e.g. for installing software. The jobs run as user LOCAL SYSTEM. Deploying a SAAZ job can take 15-30 minutes, which is too long to wait between test runs. So how does one open a command prompt as user LOCAL SYSTEM [...]]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://www.zenithinfotech.com/" target="_blank">Zenith Infotech</a>&#39;s SAAZ platform allow you to set up jobs to run on client machine, e.g. for installing software. The jobs run as user LOCAL SYSTEM. Deploying a SAAZ job can take 15-30 minutes, which is too long to wait between test runs. So how does one open a command prompt as user LOCAL SYSTEM for testing? Adi Otlean provides the answer near the end of <a href="http://blogs.msdn.com/adioltean/articles/271063.aspx" target="_blank">this post</a>:
</p>
<ol>
<li>Open a command prompt and type<br />
	<code>sc create CmdSvc binpath= "cmd /K start" type= own type= interact</code><br />
	<code>sc start CmdSvc</code><br />
	Attempting to start the service will fail with error 1053 because CMD doesn&#39;t have any service-related code. However it will also open a new CMD window running as LOCAL SYSTEM.  </li>
<li>Do your testing in the new CMD window. </li>
<li>When you&#39;re done, you might want to get rid of the service:<br />
	<code>sc delete CmdSvc</code></li>
</ol>
<p>
Thanks Adi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mcbsys.com/techblog/2009/05/run-cmd-as-local-system-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zenith A.S.E. Scripting Tips and Tricks</title>
		<link>http://www.mcbsys.com/techblog/2009/05/zenith-a-s-e-scripting-tips-and-tricks/</link>
		<comments>http://www.mcbsys.com/techblog/2009/05/zenith-a-s-e-scripting-tips-and-tricks/#comments</comments>
		<pubDate>Fri, 15 May 2009 14:13:00 +0000</pubDate>
		<dc:creator>Mark Berry</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[a.s.e.]]></category>
		<category><![CDATA[automise]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[zenith]]></category>

		<guid isPermaLink="false">/mark/post/Zenith-ASE-Scripting-Tips-and-Tricks.aspx</guid>
		<description><![CDATA[The Zenith Infotech Advanced Scripting Engine (A.S.E.) provides a framework for deploying scripts written in Zenith&#8217;s OEM version of Automise 3 Professional. Scripts can be deployed once on demand or, using templates, on a recurring schedule.
A.S.E. scripting is still fairly new in the Zenith offering, and definitely takes some getting used to. Here are a [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.zenithinfotech.com/" target="_blank">Zenith Infotech</a> Advanced Scripting Engine (A.S.E.) provides a framework for deploying scripts written in Zenith&#8217;s OEM version of <a href="http://www.automise.com/automise.aspx" target="_blank">Automise</a> 3 Professional. Scripts can be deployed once on demand or, using templates, on a recurring schedule.</p>
<p>A.S.E. scripting is still fairly new in the Zenith offering, and definitely takes some getting used to. Here are a few things that I&#8217;ve learned along the way. I&#8217;ll cover five topics:</p>
<p style="padding-left: 30px;">Script Parameters<br />
INI Files<br />
Helper Scripts<br />
ITS Variables and the SAAZ Extended Database<br />
When Scripts Run<br />
MD5 Checksums</p>
<p><span id="more-42"></span></p>
<h1>Script Parameters</h1>
<p>The Zenith agent runs Automise scripts using Automise&#8217;s ATCMD command-line utility. One powerful feature of command-line execution is the ability to initialize script variables using command-line parameters.</p>
<p>For example, let&#8217;s say you write a script to send an email. Rather than hard-code the SMTP host, port sender, recipient, etc., you want to use parameters to supply that information.</p>
<ol>
<li>In Automise, define the parameters as normal variables, e.g. SMTPHost, SMTPPort, SMTPSender, etc.</li>
<li>When creating the Send Email action, use the parameters in the appropriate fields, e.g. in the Host field type %SMTPHost%. If the field is a drop-down (like SMTP Port), you&#8217;ll have to add code manually. With the Send Email action highlighted, click on the Script Editor tab, then on the Before Action tab. Add the following line:<br />
<code>Action.Port = CInt(SMTPPort)</code></li>
<li>To test the script, you can either supply default values to the parameter variables and run from inside Automise, or you can use ATCMD to run the script from a command line. This ATCMD example sends output to a text file and sets two variables (parameters):<br />
atcmd /PSendEmail.zatz3 /LSendEmail.txt /VSMTPHost=&#8221;smtp.myserver.com&#8221;;SMTPPort=25</li>
<li>When defining the script in the SAAZ portal, add one Command Line Parameter for each variable that you want to pass in to the script. Add the parameters in this format:<br />
<code>SMTPHost="smtp.myserver.com"</code></li>
</ol>
<h2>Parameter Length</h2>
<p>When running scripts on demand, I have yet to encounter a limitation on how many parameters can be supplied or how long they can be. However, the same script that works fine on demand may fail when run from a template. In the ACM Execution Health Status report, on the Success/Failure Details tab, you will see this message:</p>
<p><code>Postprocessing:Exit with return code: 14 (ERRORSETTINGVARIABLE)</code></p>
<p>If you hunt down the text log of the script execution in the <code>C:\Program Files\SAAZOD\AutomiseLogs</code> directory, you will see a short log listing a few of your variables and ending with the line:</p>
<p><code>Error - variable doesn't exist:</code></p>
<p>At this point you may already suspect that the command line was truncated, which would mean that the script could not initialize all of your variables. Further sleuthing will lead you to <code>C:\Program Files\SAAZOD\ApplicationLog\SAAZScheduler.log</code>. Search for the name of the failed script and you should see the truncated command line. You can see command lines for upcoming scheduled executions in <code>C:\Program Files\SAAZOD\Configuration\SAAZScheduler.ini</code>.</p>
<p>Zenith support tells me that the command line limit was 300 characters. On one machine where I had this issue, they installed an updated SAAZScheduler.exe (version 5.0.0.6 dated 5/11/09) that reportedly allows command lines up to 1000 characters. The new version did in fact solve the problem.</p>
<p>Update 6/5/2009: Zenith deployed the updated components to all agents a couple weeks ago. Since then, I haven&#8217;t had any parameter length issues.</p>
<h1>INI Files</h1>
<p>Another way to set script variables is to retrieve them from an INI file using the Load Variables from INI action. How do you get them into the INI file in the first place? With the Save Variables to INI action.</p>
<p>For example, you could write a script to store all the needed SMTP variables in an INI file. Run that script on each computer you manage, and each computer will have a copy of your custom INI file. Then you can retrieve those variables from the INI file whenever you need to send an email.</p>
<h1>Helper Scripts</h1>
<p>One very interesting feature of Automise is the ability to &#8220;call&#8221; scripts from other scripts. These are referred to as helper scripts, support scripts, or dependent scripts.</p>
<p>In Automise, you call the helper script using the Include Project action. You can pass variables from the calling script to the helper script.</p>
<p>In Zenith, you first define the helper script as a stand-alone script. The script can have its own parameters. Then you define the calling scripts, and under Additional Script File Name, choose the helper script from the drop-down list.</p>
<p>I use a helper script to send email. The helper script is responsible for retrieving SMTP variables from an INI file and sending the email. The calling script passes the message subject, message body, and optionally the attachment name to the helper script.</p>
<h2>Where Is That Script?</h2>
<p>In order to call a helper script, you&#8217;ll need to know where the SAAZ agent stores it after downloading it. If you look for scripts in the SAAZ agent directory, you may find them in this folder:</p>
<p><code>C:\Program Files\SAAZOD\ProcessedScripts</code></p>
<p>In a script built from the SAAZBaseScript, that folder is available as a variable named &#8220;Agent-downloaded-script-directory&#8221;. However, Zenith support pointed out that scripts are only stored in this directory when they are scheduled using templates. On-demand scripts are never stored there, so references to scripts in that directory may fail.</p>
<p>It turns out that for on-demand execution, the Zenith agent temporarily stores the primary <em>and</em> helper scripts in this directory:</p>
<p><code>C:\Program Files\SAAZOD\ATCMDExecutables</code></p>
<p>I say &#8220;temporarily&#8221; because I was only able to determine this by listing the contents of this directory from inside a script. Once the script completed, the directory was empty again.</p>
<p>The good news is that in both cases, the helper scripts are in the same directory as the primary script. This means that you can use Automise&#8217;s built-in &#8220;PROJECTDIR&#8221; variable. This variable identifies where the calling script is running, so it is also the location of the helper scripts. To specify the helper script, in the Include Project action, use PROJECTDIR plus the script name, for example:</p>
<p><code>%PROJECTDIR%\SendEmail.zatz3</code></p>
<h1>ITS Variables and the SAAZ Extended Database</h1>
<p>Each script can optionally upload the contents one or more variables to the SAAZ Extended Database, which can be a handy way to check the output from scheduled scripts. Just create a variable with a name starting with &#8220;ITS_&#8221;. When the custom action Post ITS Variables to SAAZ Data Center runs, the variable&#8217;s contents will be uploaded to the SAAZ Extended Database. (Post ITS Variables to SAAZ Data Center is part of the SAAZBaseScript, which you use as a starting point for all your scripts.)</p>
<p>For example, if I create a variable named &#8220;ITS_AVStatus&#8221;, in the SAAZ Extended Database screen, for each machine that runs the script, I will see a variable named &#8220;AVStatus&#8221; and whatever value was supplied by the script. Values are limited to 100 characters.</p>
<p>Some gotchas on ITS variables:</p>
<ul>
<li>As of this writing, you cannot delete variables once they are in the SAAZ Extended Database. Use sparingly!<br />
Update 6/5/2009:&nbsp; ITS Variables can now be deleted. (Thanks Zenith!)</li>
<li>Scripts cannot <em>download</em> ITS variables. This means you cannot access yesterday&#8217;s value from the SAAZ Extended Database when you run the script today. (The Get SAAZ Variables action at the beginning of the SAAZBaseScript sets local variables; it does not get values from the SAAZ Extended Database.) If you need to access data from the previous script execution, you&#8217;ll need to store the data on the local machine. One easy way to do that is using INI files (see above).</li>
</ul>
<h1>When Scripts Run</h1>
<p>When you schedule an on-demand script, you give it a time window starting from now to any point in the future (even years from now). The script will run one time. If the target machine is not online, the script will run when it is turned on and checks in, as long as it checks in before the Till Date.</p>
<p>On the other hand, when you schedule recurring scripts using templates, you define a specific time for the script to run. If the machine is offline at that time, that execution is skipped</p>
<h1>MD5 Checksums</h1>
<p>If you are writing and updating a lot of scripts, you will need to calculate lots of MD5 checksums for publishing the script in the Zenith portal. Zenith includes an MD5 tool, but a faster approach is to use the free <a href="http://www.bullzip.com/products/md5/info.php" target="_blank">BullZip MD5 Calculator</a>:&nbsp; just right-click on a script in Explorer to get the MD5 checksum. &nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mcbsys.com/techblog/2009/05/zenith-a-s-e-scripting-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

