<?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>Software Rockstar &#187; Scripting</title>
	<atom:link href="http://www.softwarerockstar.com/tag/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.softwarerockstar.com</link>
	<description>Coaching and mentoring on a journey from a Developer to an IT Leader</description>
	<lastBuildDate>Tue, 13 Sep 2011 17:18:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Windows Installer Cleanup Utility</title>
		<link>http://www.softwarerockstar.com/2007/05/windows-installer-cleanup-utility/</link>
		<comments>http://www.softwarerockstar.com/2007/05/windows-installer-cleanup-utility/#comments</comments>
		<pubDate>Tue, 22 May 2007 13:43:00 +0000</pubDate>
		<dc:creator>SoftwareRockstar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Cool Tools]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Rants & Raves]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://mharoon.wordpress.com/2007/05/22/windows-installer-cleanup-utility/</guid>
		<description><![CDATA[If you have ever used MSI installation packages involving Windows Installer, you are probably aware of its nuisance. I can deal with the fact that it&#8217;s a pain to create decent installations without shelling out hundreds or thousands of dollars for third party tools such as Wise and InstallShield, but I just can&#8217;t cope up [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever used MSI installation packages involving <a href="http://msdn2.microsoft.com/en-us/library/aa372866.aspx">Windows Installer</a>, you are probably aware of its nuisance.  I can deal with the fact that it&#8217;s a pain to create decent installations without shelling out hundreds or thousands of dollars for third party tools such as <a href="http://www.wise.com/">Wise</a> and <a href="http://www.installshield.com/">InstallShield</a>, but I just can&#8217;t cope up with the fact that my customers can&#8217;t install or uninstall an application built using Windows Installer for no apparent reason.  When using the Add/Remove Programs applet in the Control Panel, sometimes MSI packages can&#8217;t be removed.  I have a system with <a href="http://www.microsoft.com/biztalk/default.mspx">BizTalk Server</a> installation that I can&#8217;t get rid of.  There are even issues around upgrading an application and at times the installer complains and won&#8217;t budge.</p>
<p>To alleviate some of the pain, Microsoft finally came up with a <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;290301">Windows Installer Cleanup Utility</a>, that can be used to remove all references to a given application from your system.  This utility just saved me a few hours worth of work when Installer refused to uninstall a given application from my system so that I could install a newer version.  Without this utility I would have had to go through and search my registry for all references to the application and remove them by manually hand.  Then, if I was lucky, I would be allowed to install the newer version of the application.  With this utility I removed the application from my system in seconds and painlessly installed the newer version after that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarerockstar.com/2007/05/windows-installer-cleanup-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JScript Eval Method In C#</title>
		<link>http://www.softwarerockstar.com/2007/02/jscript-eval-method-in-c/</link>
		<comments>http://www.softwarerockstar.com/2007/02/jscript-eval-method-in-c/#comments</comments>
		<pubDate>Wed, 07 Feb 2007 04:15:00 +0000</pubDate>
		<dc:creator>SoftwareRockstar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[assembly results]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[dynamic evaluation]]></category>
		<category><![CDATA[evaluatorInstance]]></category>
		<category><![CDATA[expression]]></category>
		<category><![CDATA[expression string]]></category>
		<category><![CDATA[JScript]]></category>
		<category><![CDATA[Method]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[microsoft jscript]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Reflection]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[static object]]></category>

		<guid isPermaLink="false">http://mharoon.wordpress.com/2007/02/06/jscript-eval-method-in-c/</guid>
		<description><![CDATA[JavaScript and JScript languages provide a convenient Eval method that allows for dynamic evaluation of expressions. This functionality can be duplicated in C# using Microsoft&#8217;s JScript CodeDomProvider and Reflection. Following class automatically compiles an in-memory assembly using JScript CodeDomProvider. The Eval method uses this assembly to dynamically evaluate specified expressions: using System; using System.CodeDom.Compiler; using [...]]]></description>
			<content:encoded><![CDATA[<div class="imageleft"><img src="http://softwarerockstar.com/wp-content/uploads/2007/02/jscript-file-256x256_21.png" alt="JScript" width="184" height="184" class="alignnone size-full wp-image-315" /></div>
<p><a href="http://en.wikipedia.org/wiki/JavaScript">JavaScript</a> and <a href="http://en.wikipedia.org/wiki/JScript">JScript</a> languages provide a convenient <a href="http://javascript.about.com/od/reference/g/seval.htm">Eval</a> method that allows for dynamic evaluation of expressions. This functionality can be duplicated in C# using Microsoft&#8217;s JScript <a href="http://msdn2.microsoft.com/en-us/system.codedom.compiler.codedomprovider.aspx">CodeDomProvider</a> and <a href="http://msdn2.microsoft.com/en-us/library/system.reflection.aspx">Reflection</a>.</p>
<p>Following class automatically compiles an in-memory assembly using JScript CodeDomProvider. The Eval method uses this assembly to dynamically evaluate specified expressions:</p>
<pre class="brush: csharp">
using System;
using System.CodeDom.Compiler;
using System.Reflection;
using Microsoft.JScript;

///
/// Implements JScript/JavaScript Eval like
/// functionality in C# to allow dynamic evaluation
/// of expressions.
///
public static class ExpressionEvaluator
{
    #region Private Members

    private static Type _evaluatorType;
    private static object _evaluatorInstance;
    private static readonly string _jscriptEvalClass =
    @&quot;import System;
class JScriptEvaluator
{
public static function Eval(expression : String) : String
{
return eval(expression);
}
}&quot;;

    #endregion

    #region Private Methods

    ///
    /// Creates a dynamic in-memory assembly using JScript.NET
    /// to evaluate expressions.
    ///
    private static void Initialize()
    {

        CodeDomProvider compiler = new JScriptCodeProvider();

        CompilerParameters parameters = new CompilerParameters();
        parameters.GenerateInMemory = true;
        parameters.ReferencedAssemblies.Add(&quot;system.dll&quot;);

        CompilerResults results = compiler.CompileAssemblyFromSource(parameters, _jscriptEvalClass);

        Assembly assembly = results.CompiledAssembly;
        _evaluatorType = assembly.GetType(&quot;JScriptEvaluator&quot;);
        _evaluatorInstance = Activator.CreateInstance(_evaluatorType);
    }

    #endregion

    #region Public Methods

    ///
    /// Evaluates specified expression using reflection
    /// on the assembly generated in Initialize() method.
    ///
    /// The expression.
    /// A string representing evaluated expression.
    public static string Eval(string expression)
    {
        if (_evaluatorInstance == null)
            Initialize();

        object result = _evaluatorType.InvokeMember(
        &quot;Eval&quot;,
       BindingFlags.InvokeMethod,
        null,
       _evaluatorInstance,
        new object[] { expression }
       );

        return (result == null) ? null : result.ToString();

    }

    #endregion
}
</pre>
</p>
<p>Using this class, we can execute statements such as:
</p>
<pre class="brush: csharp">
        Console.WriteLine(ExpressionEvaluator.Eval(&quot;2 + 9&quot;));
        Console.WriteLine(ExpressionEvaluator.Eval(&quot;System.DateTime&quot;));
        Console.WriteLine(ExpressionEvaluator.Eval(&quot;Environment.OSVersion.VersionString&quot;));
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarerockstar.com/2007/02/jscript-eval-method-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anthem.NET &#8211; An AJAX Library for ASP.NET</title>
		<link>http://www.softwarerockstar.com/2006/12/anthem-net-an-ajax-library-for-asp-net/</link>
		<comments>http://www.softwarerockstar.com/2006/12/anthem-net-an-ajax-library-for-asp-net/#comments</comments>
		<pubDate>Thu, 07 Dec 2006 17:02:00 +0000</pubDate>
		<dc:creator>SoftwareRockstar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Cool Tools]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://mharoon.wordpress.com/2006/12/07/anthem-net-an-ajax-library-for-asp-net/</guid>
		<description><![CDATA[A coworker introduced me to Anthem.NET, which is an AJAX library for the ASP.NET platform. Within the last year or so, quite a few AJAX libraries have surfaced, including Microsoft&#8217;s ASP.NET AJAX (formerly known as ATLAS), and other free and commercial products. Some of these are pretty decent, while others are not even worth investigating. Anthem.NET, [...]]]></description>
			<content:encoded><![CDATA[<p>A coworker introduced me to <a href="http://anthemdotnet.com">Anthem.NET</a>, which is an <a href="http://en.wikipedia.org/wiki/Ajax_(programming)">AJAX </a>library for the <a href="http://en.wikipedia.org/wiki/ASP.NET">ASP.NET</a> platform. Within the last year or so, quite a few AJAX libraries have surfaced, including Microsoft&#8217;s <a href="http://ajax.asp.net/Default.aspx">ASP.NET AJAX</a> (formerly known as ATLAS), and other free and commercial products. Some of these are pretty decent, while others are not even worth investigating. Anthem.NET, with it&#8217;s impressive functionality, belongs to the former group.</p>
<p>Some of the features of Anthem.NET include:</p>
<ul>
<li>Free and open source</li>
<li>Support for .NET 1.x and 2.0</li>
<li>Seamless integration with Visual Studio 2005</li>
<li>Broad browser support (IE, Firefox, and Safari)</li>
<li>Support for Mono</li>
<li>Familiar ASP.NET postback style functionality</li>
<li>Support for ASP.NET ViewState</li>
<li>Support for web user controls</li>
</ul>
<p>You can download Anthem.NET from <a href="http://anthem-dot-net.sourceforge.net/">SourceForge</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarerockstar.com/2006/12/anthem-net-an-ajax-library-for-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft LogParser</title>
		<link>http://www.softwarerockstar.com/2006/08/microsoft-logparser/</link>
		<comments>http://www.softwarerockstar.com/2006/08/microsoft-logparser/#comments</comments>
		<pubDate>Tue, 15 Aug 2006 15:28:00 +0000</pubDate>
		<dc:creator>SoftwareRockstar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Cool Tools]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Rants & Raves]]></category>
		<category><![CDATA[Reporting]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://mharoon.wordpress.com/2006/08/15/microsoft-logparser/</guid>
		<description><![CDATA[It&#8217;s kind of ironic that soon after I finished writing a log viewer for my log4Net XML logs, I came across this universal log parsing tool by Microsoft called Log Parser 2.2. I started playing with it and it seems pretty good at what it does. You can create nice looking HTML reports and even [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s kind of ironic that soon after I finished writing a log viewer for my <a href="http://logging.apache.org/log4net/">log4Net</a> XML logs, I came across this universal log parsing tool by Microsoft called <a href="http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx">Log Parser 2.2</a>. I started playing with it and it seems pretty good at what it does. You can create nice looking HTML reports and even charts from your log data (<span class="blsp-spelling-error">xml</span>, <span class="blsp-spelling-error">csv</span>, <span class="blsp-spelling-error">tsv</span>, active directory objects, registry, etc.). All it takes is some basic <span class="blsp-spelling-error">SQL</span> skills, and you are on your way to producing meaningful views / reports out of your log files. The beauty of the tool is in its extensibility; you can parse an array of data types using this tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarerockstar.com/2006/08/microsoft-logparser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

