News Archives 2017 Q1
has been updated:
- All values are now returned either as string or as 32-bit integer (no more arrays); booleans are returned as strings
- Added new
ListPropertyValues( ) method
ListPropertyTypes( ) method
- Several properties were actually implemented as methods; this has been corrected
Note that the DLL needs to be reregistered, you can use the batch file included in the ZIP file.
is a new "wrapper" DLL
, written in C#, to access .NET's SystemInformation class
with COM enabled scripting languages, e.g. VBScript.
Set objSysInfo = CreateObject( "RobvanderWoude.SystemInformation" )
' Read some property values
' Get help for this DLL
WScript.Echo objSysInfo.GetHelp( )
' Get this DLL's version
WScript.Echo objSysInfo.GetVersion( )
' List all available property names
WScript.Echo objSysInfo.ListPropertyNames( )
' List all available property names and their output types
Wscript.Echo objSysInfo.ListPropertyTypes( )
To use this DLL it needs to be registered once; I included a batch file to register the DLL in the ZIP file.
Note that VBScript cannot handle the DLL's array values yet, this is high on my ToDo list (looks like it will require "manually" concatenating the array elements into a string).
has been updated:
- Properties on the command line can now be entered either by name or by index
- The output for PowerStatus now displays some useful information instead of "System.Windows.Forms.PowerStatus"
has been updated already: it now accepts multiple properties on the command line, the
switch has been added to I
gnore and skip invalid properties specified on the command line, and the
ist all) switch was added for better "compatibility" with GetSystemMetrics.exe's command line.
has been updated too: the new version also accepts multiple metrics on the command line, and like SystemInformation.exe it will default to list all metrics if nothing was specified.
• Tim Williams reported an error in Tomorrow.vbs
: I forgot the leading zero for the day in yesterday's date.
• I added a new Hardware section to the Miscellaneous submenu.
It will feature real hardware as well as specific hardware related software and scripts.
• Usually, if I have to delete an entire directory tree, I use Windows'
RD /S /Q d:\keep_parent\delete_this_dir
Today, however, I ran into a "path too long" error, and neither
nor Explorer were able to delete the directory tree.
An ingenious workaround came from wbkang
ROBOCOPY.EXE "d:\keep_parent\Empty" "d:\keep_parent\delete_this_dir" /MIR
• A minor update for DateAdd.bat
- "Now" or "Today" are accepted as valid date arguments
- Improved handling of doublequotes in command line arguments
has been updated:
- Whereas the 10 year old version 1.10 required REGEDIT.EXE to read the registry (requiring elevated privileges in Windows Vista and later), the new version 2.00 uses REG.EXE instead to read the registry, and no longer requires elevated privileges.
- Whereas the old version required the date to be in the local format, the new version accepts dates in local format as well as ISO 8601 (yyyy-MM-dd) format.
The resulting "output" date will be in the same format as the "input" date.
has been updated:
- In the initial version, the default "target" path to write the configuration file to, would always be the current directory.
In the new version 1.01, if flash drives are detected, the default "target" path will be changed to the root of the first flash drive instead.
- When the "Create File" button is clicked, the timer to update the actual tim to be written to the configuration file is stopped; since the time has been written to file already, ther is no need for it to be updated anymore.
In EnergyLoggerConfigGUI.exe 1.01, the caption of the button will than change to "Restart"; when clicked, nothing will be written to file, but the timer will be started again, and the button's caption will be changed back to "Create File".
When clicked again, the new (updated) time and settings will be written to file.
- Captions have been added to designate the target time and target path fields.
- A tooltip has been added to explain you have to click the target path field to change the target path.
Press F1 for help:
Press F1 for help:
• While working with my VoltCraft Energy Logger 3500, a device to measure and log electric power consumption, I was annoyed by the device's almost impossible manual setup.
I knew it could also work with a setup file on the SD card, and after some internet searching I found this page with info on the setup file format
I also found some links to software to create a setup file, and more software to read the device's data, but none of these worked.
So for a start I wrote my own setup file creator in C# (batch and VBScript are definitely "sub-optimal" choices for handling binary output): EnergyLoggerConfig.exe
is a tool I initially wrote to debug PHP "Unexpected End Of File" errors caused by missing curly braces.
This first public release will check any
source file for parentheses, brackets or curly braces, and return a warning if the number of opening characters does not match the number of closing characters.
See the program's help screen
• A minor update for CompareVersions.bat
: an error in its command line error handling has been fixed.
is an NT batch file version of its VBScript namesake
, i.e. it compares 2 version strings and tells you which one is higher.
Run it without command line arguments for details on its usage.
• A new VBScript function CompareVersions
has been added.
It compares two version string digit by digit (instead of a string comparison which would tell you that "9.0" is greater than "10.1").
Read the comments in the code to understand its usage.
• As of now, I will use the ISO date format (YYYY-MM-dd) in my news pages.
• Michael Klement pointed out a really thorough discussion of batch file comments
Besides the usual
and double colons, alternative styles are discussed as well, each with their pros and cons.
For all batch scripters: read this discussion!
Michael also pointed out some dead links and an missing info about script signing in my PowerShell: Getting Started
• I added a "Light Edition" of the VBScript wildcards example
The "Full" edition allows a relative or absolute path in the filespec, and it returns the fully qualified paths of the matching files.
The Light Edition does not allow a path in the filespec, and it returns only the names (with extensions) of the matching files.
is a new batch file to remove some or all disconnected devices.
It "evolved" from the now 13 years old RenewUSB.bat
, but unlike the latter, ResetDevices.bat
isn't limited to USB devices.
Both use Microsoft's DEVCON
tool; if DEVCON isn't found, the batch files will prompt you to download it.
• Oops, ResetDevices.bat
's first bug has been fixed: it would ignore doublequoted command line arguments (i.e. filters) if combined
with unquoted command line arguments (i.e. options).
• While working on ResetDevices.bat, I also updated the DEVCON
download link in RenewUSB.bat
However, you should seriously consider not
using RenewUSB.bat, unless you still use Window 2000 or XP...
is definitely preferred!
• I wish you all a happy and healthy new year!
page last modified: 2018-04-16