<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blind Not Dumb (Posts about scripting)</title><link>https://www.feoh.org/</link><description></description><atom:link href="https://www.feoh.org/categories/scripting.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:feoh@feoh.org"&gt;Chris Patti&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-NC-SA"
style="border-width:0; margin-bottom:12px;"
src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Mon, 02 Mar 2026 00:41:15 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Windows Scripting - a VBScript Survival Guide</title><link>https://www.feoh.org/posts/windows-scripting-a-vbscript-survival-guide.html</link><dc:creator>cpatti</dc:creator><description>&lt;section id="introduction"&gt;
&lt;h2&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;If you're new to the world of Windows scripting as I am, the array of acronyms, technologies and access methodologies that you need to traverse in order to get anything done can range from bewildering on a good day to utterly derangement inducing on a bad one.&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class="line"&gt;I've been doing installer and deployment development at a Windows enterprise software company for the last year or so, and after decades spent comfortably swaddled in the familiarity of the UNIX and Java world, I definitely found myself feeling shell shocked, disoriented, and frustrated at the lack of any sort of cohesive resources to aid me in my quest.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Microsoft has been doing its best to pretend VBScript doesn't exist - touting &lt;a class="reference external" href="https://blogs.msdn.com/PowerShell/"&gt;Windows PowerShell&lt;/a&gt; as the way and the light.  PowerShell is indeed an awesome tool, and I for one would happily consign VBScript to the briny deeps never to be thought of again were it not for one little problem - the vast majority of Windows systems running in the wild don't have PowerShell installed.   Until a new day dawns and PowerShell is on *every single* Windows box our company wants to install its software on, VBScript remains the lowest common denominator for system scripting and thus the only &lt;strong&gt;real&lt;/strong&gt; game in town for install time scripting.&lt;/p&gt;
&lt;p&gt;The goal of this article is not to teach you VBScript, sadly, there are essentially no books and precious few online resources dedicated to this topic online.  I will offer pointers to those that I have found most useful, and some collected wisdom on how to best make use of them, as well as some pitfalls I encountered which with any luck I can help you avoid.&lt;/p&gt;
&lt;p&gt;That said, let's get started.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="learning-vbscript"&gt;
&lt;h2&gt;2. Learning VBScript&lt;/h2&gt;
&lt;p&gt;This will mostly be a collection of pointers to resources with a smidgen of commentary on each to get you moving in the right direction.&lt;/p&gt;
&lt;section id="a-books"&gt;
&lt;h3&gt;A. Books&lt;/h3&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://www.amazon.com/Windows-XP-Annoyances-Geeks-2nd/dp/0596008767/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1270065442&amp;amp;sr=8-1"&gt;Windows XP Annoyances&lt;/a&gt; - This book should really be titled "Windows For Geeks" :) it is the single most useful book I have ever encountered for someone trying to make the transition from another environment and isn't content to just grit their teeth and groan at all the annoying defaults Windows ships with.  In addition to an incredible amount of depth around the Windows registry and how you can wield it to suit your needs, this book also has one of the best simple introductions to system scripting with VBScript I've seen.  Two thumbs up. Note that this is the 1997 edition, and this book now comes in Windows Vista and Windows 7 flavors which I haven't read, but can only assume are equally awesome.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://www.visualbasicscript.com/"&gt;visualbasicscript.com&lt;/a&gt; - This is far and away the single best VBScript resources on the intertubes.  The folks in these forums are experts, and will help you solve your problem virtually every time.  I can't say enough about the incredible community here.  Nine out of ten times, if I go looking somewhere else first I end up coming back here and wishing I hadn't wasted my time elsewhere first :)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://technet.microsoft.com/en-us/scriptcenter/default.aspx"&gt;Microsoft Script Center / The Scripting Guys&lt;/a&gt; - The second most useful scripting site on the web.  The Scripts Repository and "Scripting Guys" MSDN blog are an incredible resource for system scripters.  While the emphasis has definitely shifted towards PowerShell these days (and rightfully so) most of the techniques discussed can be leveraged in VBScript once you get cozy with the syntactic differences between the two (very different) languages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://msdn.microsoft.com/en-us/library/d1et7k7c%28v=VS.85%29.aspx"&gt;MSDN Windows Scripting Technologies&lt;/a&gt; - This page covers things like the Windows Scripting Host, the core technology that actually allows you to perform useful work in VBScript.  While somewhat more complete than the VBScript reference itself, it's no great shakes.  You'll find yourself learning much more from examples published elsewhere, but for the occasional API lookup or clarification it can be useful.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://msdn.microsoft.com/en-us/library/t0aew7h6%28VS.85%29.aspx"&gt;MSDN VBscript Reference&lt;/a&gt; - You'll note this site's position well down the list.  It's there for a reason.  The documentation provided here is very sketchy and frankly incredibly misleading in places.  The authors seem to have weaseled out of writing a more complete documentation set by making a vacuous assertion along the lines of "Well, it's just like regular Visual Basic, with a few minor differences".  This leaves people like myself who have never had the need to touch a fully fledged VB implementation out in the cold, feeling like second class citizens.  While these pages can be useful for occasional clarification on some obscure language feature, those seeking to understand how the language works in the large should definitely look elsewhere.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://support.microsoft.com/kb/308364"&gt;Windows Script Debugging Microsoft KB Article&lt;/a&gt; - This article will get you started interactively debugging your scripts using Visual Studio.  Don't bother with the Windows Script Debugger, Visual Studio Express is free and much better :)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://www.w3schools.com/vbscript/default.asp"&gt;W3Schools VBScript Tutorial/Reference&lt;/a&gt; - This page is definitely rather Web-centric, focusing on VBScript in classic ASP programming, however, the core language and some of the techniques are the same.  In many cases this is a better reference than the MSDN one, and the tutorial lets you work through the examples online in a web browser which is cool.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="debugging"&gt;
&lt;h2&gt;3. Debugging&lt;/h2&gt;
&lt;section id="who-turned-the-lights-out"&gt;
&lt;h3&gt;Who turned the lights out?&lt;/h3&gt;
&lt;p&gt;If you find that some script you've inherited is not working, but you get exactly zero output or errors, look for the telltale &lt;code class="docutils literal"&gt;On Error Goto 0&lt;/code&gt; or &lt;code class="docutils literal"&gt;On Error Resume Next&lt;/code&gt; statements. These basically disable VBScript's inherent error handling functionality and cause your script to silently ignore errors. Helpful, eh?&lt;/p&gt;
&lt;/section&gt;
&lt;section id="never-run-while-blind-folded"&gt;
&lt;h3&gt;Never run while blind folded.&lt;/h3&gt;
&lt;p&gt;Know how you're invoking your VBScript. If you're calling your script from an installer or some such executable, you're likely using Microsoft's &lt;code class="docutils literal"&gt;cscript&lt;/code&gt; tool. which doesn't do a very good job of always displaying handy things like syntax or run time errors. Try running your script with &lt;code class="docutils literal"&gt;wscript&lt;/code&gt; instead for debugging purposes. Heretofore mysterious behavior may become clear :)&lt;/p&gt;
&lt;/section&gt;
&lt;section id="that-s-all"&gt;
&lt;h3&gt;That's all!&lt;/h3&gt;
&lt;p&gt;Hopefully this post will prove useful to some poor soul, manacled in place, suffering through their own personal Windows induced hell. Even if it isn't, these tidbits have been rattling around in my head since I escaped (I now work for &lt;a class="reference external" href="https://www.bluestatedigital.com"&gt;Blue State Digital&lt;/a&gt;, we're a LAMPs shop (Linux, Apache, MySQL, PHP) and I hope to never be trapped in Windows enterprise limbo again!&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;</description><category>deployment</category><category>installers</category><category>microsoft</category><category>powershell</category><category>scripting</category><category>systems</category><category>vbscript</category><category>visualbasic</category><category>windows</category><guid>https://www.feoh.org/posts/windows-scripting-a-vbscript-survival-guide.html</guid><pubDate>Wed, 31 Mar 2010 19:18:00 GMT</pubDate></item><item><title>3 Things Microsoft Should Do for Release Engineers</title><link>https://www.feoh.org/posts/3-things-microsoft-should-do-for-release-engineers.html</link><dc:creator>cpatti</dc:creator><description>&lt;p&gt;For the last year or so I've been working at a 100% Windows based enterprise development shop.   They ship a fairly large and complex application for health insurance providers, which draws on many of the core technologies in the Microsoft enterprise stable.&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class="line"&gt;This post highlights a few things that make working in this environment a whole lot more onerous than it needs to be in my opinion, so let's get started.&lt;/div&gt;
&lt;/div&gt;
&lt;section id="installers"&gt;
&lt;h2&gt;1. Installers&lt;/h2&gt;
&lt;p&gt;The Windows installation landscape has been a bleak one indeed for a very long time.  Tools like Installshield with their own proprietary languages like InstallScript make installer development unnecessarily painful and baroque.  Is there &lt;strong&gt;really&lt;/strong&gt; any reason I should be programming in a language with no real data structures to speak of in 2010?  Even flow of control is handled in a way I can only describe as baroque.  There are methods/functions, but the main body of your installer's code has to jump around everywhere using goto.  What a mess.&lt;/p&gt;
&lt;p&gt;There is hope on this front, in the form of &lt;a class="reference external" href="https://wix.sourceforge.net/"&gt;WiX&lt;/a&gt;, the Windows Installer XML toolkit, which allows developers to iteratively build and design their installer along with the regular development process.  Right now however the learning curve seems incredibly steep.  Perhaps Visual Studio could generate a template WiX project to get people started?&lt;/p&gt;
&lt;p&gt;I'd also love to see some thought given to simplifying the deployment model for things like &lt;a class="reference external" href="https://msdn.microsoft.com/en-us/library/ms685978%28VS.85%29.aspx"&gt;COM+&lt;/a&gt; - which feels to me like a magic black box with myriad buttons and levers, all of which are a bear to get right at install time.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="builds-scm"&gt;
&lt;h2&gt;2. Builds/SCM&lt;/h2&gt;
&lt;p&gt;MSBuild needs to have &lt;strong&gt;dramatically&lt;/strong&gt; better documentation, and to a lesser extent so does TFS  - they get the broad bits right - everything you could want to do through the UI is covered, but process automation using scripting / command line tools gets substantially murkier.&lt;/p&gt;
&lt;p&gt;In the 'credit where credit is due' department, the TFS team has been incredibly responsive on their forums, and that's what's helped us get by so far, but there's no substitute for first rate docs.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="infrastructure-scripting"&gt;
&lt;h2&gt;3. Infrastructure Scripting&lt;/h2&gt;
&lt;p&gt;As of right now, there are a thousand different interfaces to accomplish the same thing, and for complex configuration tasks like configuring IIS at install time, the possibilities can be dizzying.  I would like to see Microsoft choose &lt;strong&gt;one&lt;/strong&gt; mechanism for run-time system/software configuration and document the heck out of it.&lt;/p&gt;
&lt;p&gt;Kudos to the &lt;a class="reference external" href="https://blogs.msdn.com/powershell/"&gt;PowerShell&lt;/a&gt; team and &lt;a class="reference external" href="https://technet.microsoft.com/en-us/scriptcenter/dd901334.aspx"&gt;The Scripting Guys&lt;/a&gt; for making great strides in this area.  PowerShell is a really nice environment for all kinds of scripting, and I look forward to the day when we can eliminate VBScript from our installers entirely in its favor, but we're not there yet sadly.  The object pipeline is one of the more powerful concepts in the modern scripting milieu, and I think Apple and the UNIX world could take a page from PowerShell's book in this regard.&lt;/p&gt;
&lt;p&gt;Being a release engineer in a Windows world presents some very interesting and different challenges for someone coming from a UNIX background like myself, and with a little bit of emphasis and effort on Microsoft's part, surmounting them could be a whole lot less painful.&lt;/p&gt;
&lt;/section&gt;</description><category>infrastructure</category><category>installers</category><category>Installshield</category><category>microsoft</category><category>msbuild</category><category>powershell</category><category>release</category><category>releng</category><category>scripting</category><category>tfs</category><category>windows</category><guid>https://www.feoh.org/posts/3-things-microsoft-should-do-for-release-engineers.html</guid><pubDate>Thu, 28 Jan 2010 18:39:00 GMT</pubDate></item></channel></rss>