News Archives 2016 Q1
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
The main part of the code was written by Vinoth Kumar
, I added drive selection.
• I wrote PrintExcel.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
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
March 7, 2016
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
: in XP only (so far), unsetting a variable will raise ErrorLevel
And Arie Quist reported two missing command line switches on my XCOPY
(introduced in Windows Vista) and
(introduced in Windows Server 2008 R2).
, written in C#, is a more advanced version of SecondChoice.bat
The executable is more like Windows' native CHOICE
- it returns the default value when Enter is pressed
- it accepts timeouts up to 86400 seconds (24 hours)
- besides spaces, it accepts colons and equal signs between switches and their values (e.g.
/C 123 or
/C=123 are all accepted)
- it allows a space in the list of choices, if that list is doublequoted, e.g.
/C " ABC" or
/C:" ABC" or
- but unfortunately, it doesn't "capture" Ctrl+Break quite as elegantly as
March 3, 2016
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
switch, the default can only be triggered by a timeout, not by pressing Enter.
March 2, 2016
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
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
February 25, 2016
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
(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
(No Verbs) forces PrintAny to use only the Print or PrintTo command as found in the registry.
February 16, 2016
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
command line switch, or the HTA will prompt you to either restart itself with elevated privileges or continue without them.
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
January 31, 2016
January 30, 2016
has been updated: error handling has been improved.
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
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
January 23, 2016
• Kevin Ridenhour sent me a brilliantly simple and reliable way to check for elevated privileges
WHOAMI /groups | FIND "12288"
will return an errorlevel
0 if the command is run from an elevated process, or 1 if not.
January 22, 2016
was the next logical step after Word2Any.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
, but doing so will only throw an exception.
accept these file types. As with its siblings, run it with the
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.
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:
- in the Settings screen, a button allows you to delete an existing DxDiag XML file once, even if the HTA is set to keep existing XML files
- also in the Settings screen, a "Theme" section has been added, allowing complete customization of the HTA's colors
- the "Theme" settings can also be changed using optional command line switches; see the HTA's Help page for details
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
Some advantages of the C# version over the VBScript version:
- the C# version is obviously faster than the VBScript version, especially so for multiple input files (wildcards in the input file name)
- the C# version accepts any valid wildcard combination for the input file name, whereas the VBScript version only accepts either a name without wildcards, or a single "
*" wildcard for its file name
- the C# version does not assume, but checks which file formats are supported (it still needs the Microsoft Save as PDF or XPS Add-in for 2007 Microsoft Office to make Word 2007 save files in PDF or XPS format, though)
January 7, 2016
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
You can now forget all my previous Word2*.vbs scripts.
January 6, 2016
, a script to open Microsoft Word documents and save them as PDF files, has been updated:
- wildcards are allowed for the file name of the Word document (only if replacing the entire name, e.g. "*.docx")
- an optional alternate output path can be specified (not allowed if wildcards are used in the Word file specification)
- silently overwriting existing PDF files no longer is the default, this now requires the optional
- error handling has been greatly improved
January 1, 2016
• A Happy New Year To Everyone!
||page last uploaded: 2016-07-07, 11:42