Rob van der Woude's Scripting Pages

News Archives 2020 Q2


[ Back to the current news page... ]


• I added a "tweak" to disable Skype UWP from starting up automatically.


SendKeys.exe is a new batch tool to send keystrokes to the active window.
I wrote it for myself to allow scripted updates of screenshots (with the aid of PrintWindow.exe) for updated scripts.
Most of its code is command line and error handling, the code that really does the job is a single line:

System.Windows.Forms.SendKeys.SendWait( args[0] );
ActivateWindow.exe is a new batch tool to activate the specified window.
Another tool I wrote for myself, for testing and documenting purposes.
It actually is an extremely stripped version of PrintWindow.exe.


• A while ago, Francesco reported bugs in SaveFileBox.exe and RichTextMessageBox.exe, both involving optional command line argument parsing.
These problems have now been addressed, and the updated versions are available for download.

Thanks Francesco
• Oops... Francesco reported two more bugs in RichTextMessageBox.exe: the default button was not activated when pressing Enter, and the dialog window didn't close after a specified timeout expired.
The default button issue was easily solved by defining the proper AcceptButton in the dialog form.
The timeout feature worked as intended while debugging, but not in the release version.
This turned out to be a case of "sub-optimal programming practice": trying to close the window created in the main thread from within the timer's seperate thread.
The issue has been solved, and the timeout feature works as intended.

Thanks Francesco


PrintWindow.exe has been updated: the new version tries to correct the measured window dimensions using GetSystemMetrics, and the new optional /C switch can be used to adjust the screenshot location and dimensions in case that correction still isn't acceptable.


PrintWindow.exe is a new command line tool to take a screenshot of the specified window.


• A minor update for GetHDDStatusGUI.ps1: its new -Modal switch makes the popup window system modal, i.e. always stay on top.
• Likewise, PrinterSelectBox.exe has also been updated: its new /M switch makes the dialog window system modal.


GetHDDStatusGUI.ps1 has been updated:


🇳🇱 Gefeliciteerd, alle geslaagden van Nederland!


• I added a paragraph on finding RUNDLL32 commands yourself to my RUNDLL32 page.


InputBox.exe had an update: the new optional /O switch makes the window stay always On top.


AirRegZKCmd.ps1 (New Zealand), AirRegVHCmd.ps1 (Australia) and AirRegFCmd.ps1 (France) are 3 new extension scripts for AirRegGUI.ps1.


AirRegGUI.ps1 has been updated to allow the use of its new AirRegOpenSkyCmd.ps1 extension.


MonitorPing.ps1 is a new script I wrote for my wife, so she can quickly check if the network printer upstairs is available.
The script pings a device (in our case a network printer) at a regular interval and shows the connection status in the Notification Area (a.k.a. System Tray).
Optionally the console can be hidden, and a beep generated at every connection status change.

Until now, I usually kept to the old way of showing help for all of my scripts when the /? parameter was used.
In PowerShell, that meant maintaining two help text blocks per script.
MonitorPing.ps1 is the first one to implement a new way of showing help on screen: it runs GetHelp '.\MonitorPing.psp' -Full when the /? parameter is used.


RichTextMessageBox.exe is the latest addition to my DialogBoxes family.
Unlike its MessageBox sibling, it allows full customization of font, text color, window size and position, timeout, modality, show on taskbar, and more.
But unlike its MessageBox sibling, it cannot be used in a scheduled task with credentials different from the logged in user.


• A new extension script for AirRegGUI.ps1 has been released: AirRegOECmd.ps1 can be used to search a downloaded Austrian aircraft registration database for a specific OE-*** aircraft registration.
The downloaded Austrian database is in PDF format, which cannot be read directly by PowerShell, so the script uses GhostScript to convert the PDF to plain text when first run.


AirRegGUI.ps1 has been updated: it now features extension scripts to search online or local aircraft registry databases for a specific country.
Extension scripts are available for for Canada (C-***, AirRegCCmd.ps1), Iceland (TF-***, AirRegTFCmd.ps1), Ireland (EI-***, AirRegEICmd.ps1), the Netherlands (PH-***, AirRegPHCmd.ps1) and the US (N***, AirRegNCmd.ps1).
Each of these extension scripts can be used as a stand-alone command line tool as well.
More extensions will follow soon.


• Jacques Bensimon sent me a clever solution for a CMD /K quirk.
He found that CMD /C "somecommand" "argument1" "argument2" returns an error message like 'somecommand" "argument1" "argument2' is not recognized as an internal or external command, operable program or batch file.
It turns out that if the command line following CMD /C or CMD /K starts as well as ends with a doublequote, that entire command line is interpreted as a single (command) string.
Jacques' solution is of the category "why-didn't-I-think-of-that": insert an @ before the first doublequote, i.e. CMD /C @"somecommand" "argument1" "argument2"

Thanks Jacques


• A minor update for AirRegGUI.ps1: a new optional command line switch /Hide hides the console, and handling of command line argument has been improved.


• Getting fed up with the unreliable results when retrieving data with the Internet Explorer object in VBScript, I discontinued AirReg.hta (VBScript/HTA) and replaced it by my latest AirRegGUI.ps1 (PowerShell).
The new PowerShell version accepts input from the command line as well as interactively in its GUI.
It is created in Visual Studio Community 2019 with a trial version of Ironman Software's PowerShell Pro Tools Suite.


NumLockIcon.ps1 is a new PowerShell script derived from my earlier CapsLockIcon.ps1 script.
As its name suggests, it will monitor and display the NumLock status in the System Tray, a.k.a. Notification Area.


AirRegGUI.ps1 is a new PowerShell demo script to look up an aircraft registration on and present the result in a GUI.


PrintWord.ps1 is a new PowerShell demo script that prints a Word document to the selected printer.


• I added more code snippets to my PowerShell Code Snippets page.
ReadExcel.ps1 is a new PowerShell demo script that reads an Excel file and displays all cells on screen.
It was based on an article by François-Xavier Cat.

Thanks François-Xavier


CapsLockIcon.ps1 had a really minor update without any impact at all for the user, but it removes a nagging warning message in Visual Studio Code.
To suppress screen output I had defined a dummy variable $key to receive a command's output:
$key = $Host.UI.RawUI.ReadKey( )
VS Code kept reminding me the variable was never used.
By using [void] $Host.UI.RawUI.ReadKey( ) instead, VS Code is satified.


Disks.ps1 is a new (Windows only) PowerShell script to list all physical harddisks and their manufacturer, model, size, bus type and more.
Hardware.hta had a minor update: the external PowerShell script was replaced by VBScript code, and a new setting allows including virtual drives in the inventory.


Hardware.hta had a major update:



Archived News pages
Archived news from 2020
Archived news from 2019
Archived news from 2018
Archived news from 2017
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: 2022-11-04; loaded in 0.0148 seconds