[Cialug] Windows Scripting

David Champion dchampion at visionary.com
Tue Jan 30 13:42:15 CST 2007


Matthew Nuzum wrote:
> On Tue, 2007-01-30 at 12:29 -0600, Todd Walton wrote:
>> I'm looking at a couple of Microsoft Press books on Windows scripting.
>>  From the introductions of each:
> 
>> To be fair I'll mention two things I like about Windows scripting that
>> I haven't yet found on Linux.  Both are file formats:
>>
>> 1) Windows Script File, .wsf
>>
>> It's a script (anything that the Windows Script Host will support,
>> which is VBScript, JScript, Perl, etc.) wrapped in an XML file.  
> 
>> 2) HTML Application, .hta
>>
>> This is da bomb.  HTA files are scripts wrapped in HTML.  
>> ... What you get, in effect, is a script
>> with a graphical user interface.  ... I'm not sure how
>> I'd do the equivalent on Linux, without actually running a web server.
> 
> Yeah, I've used windows scripting too, it is quite convenient. But at
> the same time, it's very easy to do things that are very insecure. I
> once wrote a script for doing batch conversion of images. A few weeks
> later, the "I love you" virus came out that used many of the same
> techniques (and, ironically, completely ruined the many gigs of images
> I'd converted previously).
> 
> I've noticed that in recent years, especially since Windows XP, security
> has become a big deal and has therefore taken a lot of the simplicity
> out of writing scripts for Windows.
> 
> On Linux, have you see the various "dialog" tools?
> 
> And, regarding the HTML interface, have you played with GWT (Google Web
> Toolkit)? It lets you easily create java based web applications, but
> when you debug the apps, instead of launching in a web-browser, it
> launches them in a self contained application window. I can't help but
> wonder if there will be a way to deploy apps like that. That would be
> cool.
> 
> I think it's ironic that Microsoft came out with PowerShell or Monad or
> Gonad or whatever it's called. It really borrows from the strengths of
> Unix shells and gives Windows a very useful shell and scripting
> environment. Wikipedia says that with exchange 2007, all administration
> is done via command line (using monad) and the guis simply execute the
> command line programs. How original!
> 

I've been doing some scripting in PHP, mostly for tasks involving 
back-end processing for PHP / mysql driven web sites. It's nice because 
I can use common include files, functions and classes between the web 
and script programs. Very handy for doing file import / exports, or data 
maintenance scripts that you want to run via cron.

I know Tim P. and his team have done a lot of PHP cli scripting for his 
GForge product, like the installer script, for instance.

I haven't done much with it lately, but there is a project called PHP 
GTK - http://gtk.php.net/ (I stopped using it when there was a lag 
between the current versions of PHP for the web and for PHP-GTK)- that 
lets you do GTK GUI interfaces driven by PHP code.

I've thought about starting to use that again. The attraction being that 
I can then share code between web, cli, and gui apps.

-dc



More information about the Cialug mailing list