Rob van der Woude's Scripting Pages

News Archives 2008 Q4


[ Back to the current news page... ]


December 30, 2008 • I enjoy demonstrating that anything that can be done with VBScript can also be done with batch files *: SecStat.bat uses WMIC to display a SecurityCenter overview for any WMI enabled computer on the network, just like its VBScript counterpart.
I also translated it to KiXtart: SecStat.kix.

* I doubt I can hold this claim forever, but it does sound nice while it lasts :-)
December 28, 2008 • While on the subject of checking AntiVirus software:
I found some really useful information in Alejandro Campos Magencio's blog on reading Windows' SecurityCenter status. Scriptomatic didn't show any of the properties listed in the blog, but with Windows' own (native) WBEMTEST.EXE I managed to find the properties for the Firewall software too.
I used this information to create SecStat.vbs, a script that will display a SecurityCenter overview for any WMI enabled computer on the network.

Thanks Alejandro

• Did you ever need to check a file's size, last-modified date, or other file properties? Or do you intend to?
If so, make sure you read my new page on reading file properties in batch files.
December 27, 2008 • Another batch file to check AntiVirus program and definitions versions, this one for AVG8 AntiVirus: AVG8Ver.bat.
December 24, 2008 • I wish you all a Merry Christmas!

• A new batch technique page: convert strings to upper or lower case.
December 23, 2008 • Today I added 2 batch files to check AntiVirus program and definitions versions: for Symantec AntiVirus/Symantec Endpoint Protection use SAVVer.bat, for Vipre AntiVirus use VipreVer.bat.
SAVVer.bat can be rather slow, I intend to improve it soon.
December 18, 2008 • Today I got another mail delivery failure on a reply to a question.
If you're wondering why you don't get a reply, try my Failed Mail page, I'll drop some of the answers there.
And if you do find the answer to your question there, then please, correct your e-mail settings.
December 17, 2008 • I updated WHICH.BAT: it now checks for DOSKEY macros and internal commands first.
December 13, 2008 • I found out that AVG's command line scanner itself provides much more information on its command line switches than AVG's website does, so I updated my Command Line Switches page.

• Besides for downloading files, scripted Internet access can also be used to read web pages: my latest VBScript example reads Foxit Reader's latest version number from its download page.
December 12, 2008 • For the sake of completeness I added a VBScript Technique page on manipulating the registry using the WSH Shell object besides the more complex WMI StdRegProv technique.
December 11, 2008 • Padmanabha Holla informed me about unexpected behaviour of DOSKEY and SET /P.
I haven't found a practical use for it yet, but it may come in handy sometime, somehow, somewhere.

Thanks Padmanabha

• More network related VBScript stuff: retrieve the MAC address(es) of the local computer.
December 10, 2008 • Did you know that you can use Java to resolve host names in VBScript? You do now.

• More command line switches: for Mozilla Firefox and Corel Quattro Pro.

• Several new network related functions were added to my Scripting Techniques page.
These new functions are all based on the free System Scripting Runtime by Franz Krainer.

Thanks Franz

• More network related VBScript stuff: retrieve the IP address(es) of the local computer.
December 8, 2008 • I added a new VBScript challenge: try to enumerate the (sub)keys in the root of a registry hive...
December 7, 2008 • I added AVG Antivirus, Sunbelt's VIPRE Antivirus + Antispyware, Microsoft Word and some "new" switches for OpenOffice to my command line switches page.
December 5, 2008 • The new Print2.vbs script swaps the default printer, issues a print command, and restores the original default printer again. The print command could be any command available. I wrote the script to print .XPS files to any non-default printer, using Microsoft's XPS Viewer, which only supports printing to the default printer from the command line. To allow unattended printing, the script also features SendKeys( ) functionality, so in a print dialog it will "press the Print button" for you.
November 29, 2008 • My latest batch file, PrintDoc.bat, uses CMCDDE to send a DDE Print or PrintTo command to Microsoft Word, thus using Word to print documents from the command line.
November 25, 2008 • Today Secunia released its free Personal Software Inspector 1.0 (PSI). PSI will warn you when a security patch is available for most of the software installed on your computer. Absolutely recommended.

Thanks guys
November 24, 2008 • I added a page on automating Outlook in VBScript.
November 22, 2008 • Denis St-Pierre sent me his list of VBScript challenges, things-you-cannot-do-in-VBScript, "Mission Impossible" stuff.
You may want to try your luck and win eternal fame.

Thanks Denis

• While on the subject of challenges, I added some batch file challenges to test your batch file scripting skills.
Solutions are supplied, but I bet some of you will find other solutions.
November 19, 2008 • Bob Homa reported an error on my Domain Names page: the PartOfDomain property for Win32_ComputerSystem requires Windows XP or later, it won't work in NT 4 or 2000 as I had written in the requirements.
Oops, sorry about that.

And thanks, Bob
November 18, 2008 • In my todo list I found a note telling me to finish and publish WhatIsMyIP.vbs.
I don't know what made me write this down, as I have no recollection of ever writing a script with that name in VBScript.
So I started more or less from scratch, found three interesting techniques to retrieve the WAN IP address from, and brought them all together on my new WAN IP address page.

• I added a new page named Batch HowTos, which contains a shorthand list of common tasks and the batch commands available to perform them.

• Oliver Schneider sent me a tip a while ago, how to use GOTO to validate command line arguments.

Thanks Oliver
November 15, 2008 • Leo Gutierrez Ramirez sent me an ingenious trick to add a comment block at the end of a batch file:

REM Code:
ECHO Hello
REM Comments:

If the closing parenthesis is missing, everything after the opening parenthesis is ignored, and thus treated as comment.
This does imply that the use of parentheses in the comment is prohibited.

Thanks Leo

• More workarounds to accomplish comment blocks can be found in the new Comment blocks chapter of my Comments page.

• I created a batch file "wrapper" for VBScript's DatePart( ) function.
The batch file is, quite surprisingly, named DatePart.bat.
Its usage is simple: DATEPART D returns the current day of the month, DATEPART YYYY returns the current year, etc.
November 12, 2008 • I added a demo VBScript to kill a process by window title, as opposed to WMI's function to kill a process by name.
To kill a process by its window title, JSWare's JSSys3.dll is required.

• Carlos M. sent me his batch "typewriter" emulator.
Very educational: try to understand how the effect is achieved.

Thanks, Carlos
November 5, 2008 • Padmanabha Holla sent me this tip how to open the current directory in Explorer with the left side explorer bar:


It inspired me to write a page on how to open folders in Explorer from the command line.

Thanks Padmanabha
October 23, 2008 • Denis St-Pierre sent me this great script some time ago: Reg2Vbs.vbs. It will convert all .REG files it finds in the current directory into (VBScript) scripts.
These resulting scripts are useful to run on systems where the use of REGEDIT is blocked, or they can be incorporated into larger (install) scripts.

• And only hours after publishing Reg2Vbs.vbs, another script, also by Denis St-Pierre, came in: Txt2Vbs.vbs.
Not unlike Reg2Vbs.vbs, Txt2Vbs.vbs converts .TXT files to VBScript code that can recreate the .TXT file.
The .TXT file could be any text file, even another script.

Thanks Denis (and sorry for the delay with Reg2Vbs)

• Reading Denis' scripts inspired me to to write Bin2Vbs.vbs, a similar script to convert binary files.
This may be useful to "store" icons in installation scripts.
October 17, 2008 • Two new clever batch scripting tricks: one by Jeffrey Ehrhart and another one by Justin.

Thanks guys

• I added an introduction to managing security with SubInACL to my Batch Techniques section.

• Also added today: a (VBScript) FTPGet function using Sapien's FTP component.

• This FTP component, plus two more by Sapien, were also added to my list of components for VBScript.
October 16, 2008 • I added a page on debugging VBScript.
Next time you ask me any VBScript related questions, I'll assume you read this page and applied these techniques...
October 15, 2008 • Ian B. McGuinness sent me this Vista help page, generated by my AllHelp.bat.
After writing my new AllHelp.vbs, I tested it on my XP SP3, so here you are, a bonus XP SP3 help page.

Thanks Ian

• Two downloadable and two online script compilers were added to my list of script compilers and packagers: Bat To Exe Converter by Fatih Kodak (tip by Edwin van Diemen), and VBScript To Exe Converter by A. Sabry (tip by Denis St-Pierre).

Thanks guys
October 14, 2008 • My AllHelp.bat generates an HTML file with help for "all" Windows commands. The help is for the operating system in which the HTML file was created, in the language of that Windows version.
One problem with the batch file is, it cannot escape ampersands and less than/greater than characters.
So I wrote AllHelp.vbs, which creates a much "cleaner" HTML page than the batch file.
October 12, 2008 • Dave Colliver reported an error in ZipDirXP.vbs, or actually in my ZipFolder function: it would display a popup message if an empty subfolder was found, and then enter an endless loop.
I updated it, and now empty subfolders are just skipped without notice.
The updated function may be a little slower, however.

Thanks Dave
October 3, 2008 • Denis St-Pierre, a regular contributor to this site, devised an ingenious way to display dynamic Progress Messages using only VBScript's native MsgBox( ) function.

Thanks Denis


Archived news from 2008 Q3
Archived news from 2008 Q2
Archived news from 2008 Q1
Archived news from 2007 Q4
Archived news from 2007 Q3
Archived news from 2007 Q2
Archived news from 2007 Q1

page last uploaded: 2016-09-19, 14:57