Rob van der Woude's Scripting Pages

News Archives 2017 Q1

 

[ Back to the current news page... ]

 

2017-03-26
SystemInformation.dll has been updated: Note that the DLL needs to be reregistered, you can use the batch file included in the ZIP file.
2017-03-25
SystemInformation.dll 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
WScript.Echo objSysInfo.UserName
WScript.Echo objSysInfo.MonitorCount
' 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).
2017-03-19
SystemInformation.exe has been updated:
• The improved PowerStatus output of SystemInformation.exe made me add a chapter Laptop or Desktop Without WMI to the Hardware Requirements page in the Silent Installations section.
2017-03-07
SystemInformation.exe is a new utility, written in C#.
It is a "wrapper" for .NET's SystemInformation class, and was inspired by my GetSystemMetrics.exe wrapper utility.
SystemInformation.exe has been updated already: it now accepts multiple properties on the command line, the /I switch has been added to Ignore and skip invalid properties specified on the command line, and the /L (List all) switch was added for better "compatibility" with GetSystemMetrics.exe's command line.
GetSystemMetrics.exe 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.
• I added a chapter Laptop or Desktop? to the Hardware Requirements page in the Silent Installations section.
• Tim Williams reported an error in Tomorrow.vbs: I forgot the leading zero for the day in yesterday's date.

Thanks Tim
2017-03-05
• I added a new Hardware section to the Miscellaneous submenu.
It will feature real hardware as well as specific hardware related software and scripts.
2017-02-28
• Usually, if I have to delete an entire directory tree, I use Windows' RD command:

RD /S /Q d:\keep_parent\delete_this_dir

Today, however, I ran into a "path too long" error, and neither RD nor Explorer were able to delete the directory tree.
An ingenious workaround came from wbkang on StackOverflow.com:

MD "d:\keep_parent\Empty"
ROBOCOPY.EXE "d:\keep_parent\Empty" "d:\keep_parent\delete_this_dir" /MIR
RD "d:\keep_parent\Empty"
RD "d:\keep_parent\delete_this_dir"


Thanks wbkang
2017-02-27
• A minor update for DateAdd.bat:
2017-02-25
DateAdd.bat has been updated:
EnergyLoggerConfigGUI.exe has been updated:

EnergyLoggerConfigGUI 1.01 screenshot

Press F1 for help:

EnergyLoggerConfigGUI 1.01 help text

2017-02-24
• EnergyLoggerConfigGUI.exe is a GUI version of EnergyLoggerConfig.exe.
Its executable is included in the energylogger.zip file.

EnergyLoggerConfigGUI 1.00 screenshot

Press F1 for help:

EnergyLoggerConfigGUI 1.00 help text

2017-02-23
• 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.
CountCharPairs.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 for details.
2017-02-22
• A minor update for CompareVersions.bat: an error in its command line error handling has been fixed.
2017-02-19
CompareVersions.bat 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.
2017-02-17
• 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.
2017-02-16
• I added a new page on File Versions to the VBScript Scripting Techniques section.
2017-02-14
• As of now, I will use the ISO date format (YYYY-MM-dd) in my news pages.
2017-02-11
• Michael Klement pointed out a really thorough discussion of batch file comments on StackOverflow.com.
Besides the usual REM 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 page.

Thanks Michael
2017-02-02
• 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.
2017-01-31
• I added a page on handling DOS wildcards in VBScript to this site's VBScript Techniques section.
2017-01-16
ResetDevices.bat 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...
ResetDevices.bat is definitely preferred!
2017-01-01
• I wish you all a happy and healthy new year!
Happy 2017

 

 

Archived News pages
Archived news from 2016
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: 2018-04-16; loaded in 0.0088 seconds