Rob van der Woude's Scripting Pages

News Archives 2016 Q1


[ Back to the current news page... ]


March 17, 2016
• A minor update for Allhelp.vbs: WINSAT's output has now been correctly escaped (the WINSAT command seems to ignore the system's actual code page and assume code page 1252).
March 11, 2016
• Since I regularly want to empty the Recycle Bin for a single drive only, I wrote DelTrash.exe (in C#).
The main part of the code was written by Vinoth Kumar, I added drive selection.

Thanks Vinoth
• I wrote PrintExcel.exe because PrintAny.exe won't find a registered print command for Excel.
Besides a file name and an optional printer name, PrintExcel.exe requires a sheet name (or 1 based tab index) and optionally a range.
March 9, 2016
• A small bug in Kolor.exe has been fixed: the old version did not show the read color(s) on screen, despite its "promise" in the help text; the new version does as it promises.
The new version's help text also explains Kolor.exe's Errorlevels.
March 8, 2016
SecondChoice.exe had a minor update: it now handles Ctrl+Break more gracefully, though I cannot prevent the Ctrl+Break being passed on to the hosting process (i.e. the batch file will receive the Ctrl+Break too, but SecondChoice.exe will return ErrorLevel 0 just like CHOICE would).
March 7, 2016
Allhelp.vbs has been updated: it now includes help for more commands than ever before, including Windows' native printer configuration scripts.
March 5, 2016
• Andrew Pixley reported a strange quirk in Windows XP's SET command: in XP only (so far), unsetting a variable will raise ErrorLevel 1.
And Arie Quist reported two missing command line switches on my XCOPY page: /B (introduced in Windows Vista) and /J (introduced in Windows Server 2008 R2).

Thanks guys
SecondChoice.exe, written in C#, is a more advanced version of SecondChoice.bat.
The executable is more like Windows' native CHOICE command, except:
March 3, 2016
SecondChoice.bat is a spin-off of a current project.
It presents a list of choices and waits for the user to either pick a choice and press Enter, or just press Enter for the default choice.
I wrote it because, though Choice supports a default value with its optional /D switch, the default can only be triggered by a timeout, not by pressing Enter.
March 2, 2016
GetProductVersion.vbs has been updated: besides executables and MSI files, it will now also handle DLLs and HTAs.
• And a minor update to InputBox.exe: some errors in the text for the "mask language" have been corrected.
March 1, 2016
• To allow scheduled tasks (running with credentials other than the logged on user's) to display messages with MessageBox.exe, MessageBoxOptions.ServiceNotification has been added to the MessageBox's options.
And to be more flexible in complex command lines (e.g. MessageBox.exe in FOR loops), the program now also accepts octal escape sequences for linefeeds, tabs and single as well as doublequotes. Check the program's help screen for details.
February 25, 2016
GetProductVersion.vbs is a new script that returns the product version of the specified .exe or .msi file.
It is based on code by Maputi and Arnout Grootveld on

Thanks guys
February 21, 2016
• A bug in Which.exe has been fixed: it no longer breaks on copying results to the clipboard.
February 17, 2016
• Filip Radtke reported problems with PrintAny.exe: he could not print PDFs to a network printer.
After a lot of "soul searching" I found out that WMI is not aware of all network printers.
The new optional command line switch /NP (No Printer check) skips the check if the printer is known in WMI.
Another problem is that though Adobe Reader DC seems to work fine using its Print or PrintTo verbs, it does not work for network printers: nothing is sent to the printer, but no error message is returned.
The new optional command line switch /NV (No Verbs) forces PrintAny to use only the Print or PrintTo command as found in the registry.

Thanks Filip
February 16, 2016
DeDup.exe is a new batch utility to remove duplicate lines from a text file or from redirected input.
It will send its results to the screen (Standard Output).
It accepts optional command line switches to ignore case, ignore whitespace, trim the output lines, and/or sort the output.
• Oops, DeDup.exe's first bug has been fixed: it would crash on the combination of redirected input and command line switches.
February 13, 2016
• Two more bugs in Basic Hardware Inventory (Hardware.hta) were fixed, both reported by Steve Robertson.
Steve spent a lot of time in tracking the bugs and testing the changes, for which I am truly grateful.
Besides bug fixes, the HTA no longer demands elevated privileges, though they are still recommended for full details (e.g. keyboard, mouse, monitor).
You can now skip the test for elevated privileges with the new /NOADMIN command line switch, or the HTA will prompt you to either restart itself with elevated privileges or continue without them.

Thanks Steve
February 11, 2016
• If cookies are enabled, you can now hide the ChangeDetection explanation block at the top of this page by clicking the red
at the top right corner.
February 6, 2016
• Steve Robertson reported some bugs in Basic Hardware Inventory (Hardware.hta) when running in Windows 8.1, and some recommendations for fixes.
The same bugs also occurred in Windows 10.
The most annoying bug was failing monitor detection in Windows > 7, which was fixed by completely rewriting the code.
The old HTA used to read the monitors' raw EDID data from the registry; "decrypting" this data is complex and not too reliable.
Since Windows Vista introduced a WMI class to extract the data, it is no longer necessary to do it the hard way.
So if you are still using Windows XP, consider keeping your old version of the HTA instead of updating it!
While working on the fix, I also added some new features I had been postponing for a while: keyboard shortcuts and tooltips with the inventory results (so you can view the full results by hovering over a field, instead of clicking and scrolling).
For a complete list of changes, see the HTA's web page.

Thanks Steve
January 31, 2016
• The new Attic Numerals Converter (AtticNumerals.hta) is a derivate of my Roman Numerals Converter (Romans.hta).
Attic numerals date back even further than Roman numerals.
To input Attic numerals, a button array is used — a bit more awkward than Roman numerals, due to the fact that not all "numbers" have a keyboard equivalent.
The self-contained HTA uses embedded images for those "numbers".
January 30, 2016
SecStat2.vbs has been updated: error handling has been improved.
Word2Any.exe has been updated: it now accepts an optional page range, which will then be converted and saved, instead of the entire document.
See Word2Any.exe's help text for details.
January 29, 2016
SecStat2.vbs is a new script to show an overview of Windows SecurityCenter2 and Windows Update status.
For Windows Vista and later versions, it replaces SecStat.vbs, which runs only in Windows XP SP2 or SP3.
January 28, 2016
• The WMI Code Generator has been updated: I added a search field as an alternative to scrolling through long lists of class names.
January 25, 2016
• Kevin Ridenhour's tip on checking for elevated privileges made me decide to dedicate a new web page to the subject: Check and Set Elevated Privileges.
January 23, 2016
• Kevin Ridenhour sent me a brilliantly simple and reliable way to check for elevated privileges:

WHOAMI /groups | FIND "12288"

FIND will return an errorlevel 0 if the command is run from an elevated process, or 1 if not.

Thanks Kevin
January 22, 2016
PowerPoint2Any.exe was the next logical step after Word2Any.exe and Excel2Any.exe.
It was a bit trickier than its siblings, though, because the available output file types aren't all acceptable: bitmap file types or RTF can be specified as output file type for PowerPoint.Application...SaveAs, but doing so will only throw an exception.
So PowerPoint2Any.exe will not accept these file types. As with its siblings, run it with the /T switch to list all accepted file types.
January 21, 2016
• A bug in Word2Any.exe has been fixed: it would throw an error if no wildcards were used at all and no file type was specified.
Excel2Any.exe is Word2Any.exe's new sibling: it will open the specified spreadsheets in Excel, and save them in any specified format, if known to Excel.
January 19, 2016
Basic Hardware Inventory (Hardware.hta) has been updated:
January 17, 2016
• For some obscure reason, I always assumed one could not automate Microsoft Office with Visual Studio Express Editions.

That was a flawed assumption!

To prove it is possible, I wrote Word2Any.exe, which is the C# version of Word2Any.vbs.
Like the VBScript version, it opens Microsoft Word documents and saves them in any file format known to Word.
And like the VBScript version, to get a list of all available file types, use the program's /T switch.
Some advantages of the C# version over the VBScript version:
January 7, 2016
Word2Any.vbs is a new script to open Microsoft Word documents and save them in any file format known to Word.
To get a list of all available file types, use the script's /T switch.
You can now forget all my previous Word2*.vbs scripts. 😉
• Lily Ward asked me to add a link to on my Date and Time page, as it is much more accessible for sight impaired individuals than
Consider it done.

Thanks for the tip, Lily
January 6, 2016
Word2PDF.vbs, a script to open Microsoft Word documents and save them as PDF files, has been updated:
January 1, 2016
A Happy New Year To Everyone!



Archived News pages
Archived news from 2015
Archived news from 2014
Archived news from 2013
Archived news from 2012
Archived news from 2011
Archived news from 2010
Archived news from 2009
Archived news from 2008
Archived news from 2007



page last modified: 2022-10-22