JayJay

This is pet topic of mine: for some reason so many Windows administrators
are completely unaware that Windows has truly excellent scripting facilities
- particularly those who migrate from UNIX and complain about the lack of
shell scripting.

One great thing is that you can instantiate UniObjects connections from
within the scripting host, which means you can perform many U2 sysadmin
tasks far more neatly than trying to directly execute UniVerse/UniData
processes with commands passed on the command line.

Just one point - if you want to shell out a scripting file via the DOS /C
switch, you probably need to specify the command host: cscript.exe
myscript.vbs

For those who don't know, Windows has two scripting hosts: cscript and
wscript. They both run exactly the same scripts, which can be either
javascript or vbscript: but wscript pops up message boxes for feedback and
cscript is console based. You need to make sure you run cscript if you are
automating.

I wrote an article about UniObjects and Windows Scripting which should still
be lurking on the U2UG knowledge base if anyone wants to follow up.

Brian


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of John Jenkins
> Sent: 24 January 2008 22:46
> To: [email protected]
> Subject: RE: [U2] Execute Windows Script
> 
> Windows "prefers" scripting language nowadays to BAT files. 
> There is an article in the IBM Knowledge Base I think in 
> building these for some specific activities. You could use it 
> as the equivalent of the Unix "at" job queue I am sure.
> 
> Something like:
> MYCMD.VBS
> ------------------
> Set ShellQueue = WScript.CreateObject("WScript.shell")
> ShellQueue.run "%comspec% /c c:\joblists\executable_here",O 
> Set ShellQueue - Nothing
> 
> Save this as with a VBS file extension and add it to the 
> Windows task scheduler
> 
> (any takers?)
> 
> http://www.microsoft.com/resources/documentation/windows/xp/al
> l/proddocs/en-
> us/batch.mspx
> 
> http://technet.microsoft.com/en-gb/library/bb490887.aspx
> 
> 
> 
> Regards
> 
> JayJay
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to