Rob van der Woude's Scripting Pages

News Archives 2015 Q4

 

[ Back to the current news page... ]

 

December 16, 2015
• Daniel Trunt pointed out an error in the Parameter Files section of my batch file Input Validation page:
FINDSTR /R /C:"[""()&'`]" "parameterfile" should actually be FINDSTR /R /C:"[\"()&'`]" "parameterfile".
How to escape doublequotes in FINDSTR's "filter string" depends on whether the /L (Literal: use "") or /R (Regular expression: use \") switch is used.
I retested the rest of the code on that same page, and found that it is not possible (do I hear a challenge?) to safely parse a parameter file while allowing doublequotes and ampersands; so I removed the code that tried to do just that, and for now I recommend using a different scripting language in that case.

Thanks Daniel
• While testing the code I "discovered" a feature I thought was missing in FINDSTR (RTFM?): though one cannot use (string1|string2|string3) like constructs in FINDSTR's "regular expressions", one can omit the /C: switch and use spaces for delimiters between choices. E.g. instead of the "true" regular expression "(string1|string2|string3)", for FINDSTR one can use "string1 string2 string3", if and only if string1, string2 and string3 don't contain spaces.
So instead of FINDSTR /R /C:"(string1|string2|string3)" one would use FINDSTR /R "string1 string2 string3"
December 4, 2015
• Several "classic" batch file websites that I link to on my own site are discontinued, go blank, disappear, get on milk cartons...
So a while ago I started marking some of them as lost, asking for feedback if any of them are found elsewhere.
Today Matt Burnham notified me of a mirror for Benny Pedersen's website.
One down up, one less to go...

Thanks Matt
November 29, 2015
AirReg.hta is a new, simple demo script to lookup airplane data by entering their registration number.
The HTA uses Airport-data.com's API to provide a photograph of the airplane, and a link to more data.
For now, the HTA can only be used in Windows 7 and earlier versions, because security restrictions in Windows 8 and 10 block fetching the data from the website.
Note that the author of this script is in no way associated with Airport-data.com.
November 24, 2015
RipCD.vbs is the VBScript version of RipCD.bat.
I added an option to run the script in interactive mode, i.e. prompting for all missing information instead of aborting with an error message.
I also added support for translated/customized messages:
  1. run the (English) script with the /L switch only to generate a "template" file named RipCD.en
  2. open RipCD.en and translate and/or customize the messages after the equal signs
  3. save the modified file with a different extension (e.g. RipCD.nl for a Dutch translation)
  4. run the sript again with the command line switch /L:extension to use your translated/customized messages (e.g. /L:NL to use messages from RipCD.NL)
When you download the ZIPped script, the Dutch translation is included as RipCD.nl.
November 21, 2015
GetUninstall.bat has been updated: it now accepts a remote computer name or IP address as an optional second command line argument.
November 20, 2015
• A minor update of CheckVarsVBS.bat: while the list of all variables is sent to Standard Output, the summary of unused variables is sent to Standard Error instead.
This allows you to display the unused variables summary only, by redirecting Standard Output to the NUL device:
CHECKVARSVBS.BAT vbscriptfile.vbs >NUL
November 19, 2015
SiteMap.exe has been updated: by default, the new version will exclude any files that are listed as "Disallowed" in robots.txt.
Use the new optional switch /I to ignore robots.txt, i.e. to not exclude any files listed as "Disallowed".
November 18, 2015
• It has been on my ToDo list for a long time, and today I finally wrote a tool to check my own VBScript code for unused variables: CheckVarsVBS.bat.
To write VBScript code I use VbsEdit, which will warn me if a variable I use is not specified (provided I use Option Explicit in the script), but it won't warn me for unused but specified variables — hence this batch file.
CheckVarsVBS.bat is a really simple batch file that lists the variables in the VBScript code that are specified with a Dim command, then counts and shows the number of times each variable is used in the script. If unused variables (count 0) are found, a second list with only those unused variables is displayed.
The batch file requires my RxGrep.exe.
November 11, 2015
• Yesterday I stumbled on a great blog post by "elrobis" explaining how to use VLC to rip CDs.
Though the original code works great, I did not like the fact that the path to VLC.exe and the CDROM drive letter were hard-coded. So I added "some" code to automatically detect these.
Well, the added amount of code turned out to be far more than the original code, because I stumbled on many issues while testing on my own multiple-CDROM system.
The resulting RipCD.bat only requires a single argument: the path to the output or target folder.
In case you have several audio CDs loaded simultaneously, you can also specify the CDROM drive to be used.
And if you want less screen output and you don't care if existing files are overwritten, you can use the optional command line switch /Q

Thanks elrobis
October 23, 2015
• I added a note on detecting 32-bit MSHTA.EXE on 64-bit Windows on my VBScript Debugging page.
October 22, 2015
Hardware.hta (Basic Hardware Inventory) has been updated once more: a bug in the NIC Speed detection has been fixed, and the WMI query for physical network adapters has been simplified.
October 20, 2015
• If you view this page on a desktop computer you may not even notice, but the layout of this page has been changed to accomodate mobile devices.
The rigid tables have been replaced by floating blocks, that will rearrange themselves vertically for small screens.
Try this page on a mobile device, then navigate to one of the older news archive pages to see the difference (the archived news will be restyled too, but the priority is low).
October 19, 2015
Hardware.hta (Basic Hardware Inventory) has been updated: a bug that made the HTA trip on empty PATH entries has been fixed.
• I am sorry to inform you that the solution for the IE Favorites Bar issue (see news item of October 15, below) did not work after all.
The issue is non-existent on my own computers, as only Internet Explorer versions 8 and 9 seem to be affected; so I cannot really test any solutions.
Since I had found a completely unrelated issue in IEPwdDlg.vbs (bad copy and paste of error handling code), I had to update the code anyway, so I took some time to experiment with the Favorites Bar in IE 11.
I found out that its visibility is registered in the following registry key:

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MINIE]
"LinksBandEnabled"=dword:00000001


So I added some code to IEPwdDlg.vbs to check if the Favorites Bar is visible; if so, it is hidden before the dialog is shown, and restored after it closes.
I hope this will solve the issue, but as noted before, I cannot test this myself.
• Steve Noble reported that for IE's Links Explorer one can use a similar technique on the following registry key:

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LinksExplorer]
"Docked"=dword:00000001


I modified IEPwdDlg.vbs accordingly.

Thanks Steve
October 15, 2015
• Some time ago, Steve Noble reported an issue with the Internet Explorer based dialogs in VBScript: if the Favorites Bar was visible in old versions of Internet Explorer, it would also show up in the dialog window, pushing input fields or buttons below the lower border.
Yesterday, he sent me a brilliant solution: after setting the focus to the input field, send a click event to that same input field to make it visible.
The first dialog I updated is IEPwdDlg.vbs, other Internet Explorer based dialogs will follow soon.
While at it, I also added some code to allow pressing the Enter key instead of clicking the OK button.

Thanks Steve
October 13, 2015
DropDownBox.exe has been updated: it now accepts the optional /L switch for localized and/or customized button captions, and the list items can be read from a text file, besides being specified on the command line.
October 11, 2015
DelFlash.bat, a batch file to search and remove Local Shared Objects (a.k.a. "Flash Cookies"), has been updated — way overdue!
It has been adapted to work in Windows 7 (and later) versions too. And the updated version will also search and remove Local Shared Objects set by Google Chrome.
Use the batch file without command line arguments for verbose interactive mode.
• On some of this site's pages, the new menu was still missing. This has been corrected.
October 6, 2015
• A minor update for TranslateCulture.exe: it now displays the descriptive name for the culture (language), besides the short code.
I used it to list the opening times of our local botanic garden in Arabic, since most of the refugees from the nearby temporary refugee camp don't speak English.
After many tries, I gave up trying to display the text correctly in Arabic in the console of my English computer.
Instead, I set the code page to 65001 (UTF-8; 1256, Arabic, may work as well in this case) and redirected the output to a file:
CHCP 65001
TranslateCulture.exe ar-SY /C /W > openinghours.txt

Notepad is perfectly capable of editing the text, adding English and Dutch text without affecting the Arabic text.
However, using the cursor in a mixed left-to-right and right-to-left document does take some getting used to...
October 5, 2015
DateTimeBox.exe was updated: the minimum width is now 220 pixels (used to be 200 pixels), otherwise the default title would not fit because of the newly added icon.
To make any title fit, you can now set the dialog window's size with the optional /H:height and /W:width switches.
Empty titles are now replaced by the default title (program name and version); to really specify an empty window title, use a doublequoted space on the command line.
October 1, 2015
• Also by request I added the option to specify an initial date/time to DateTimeBox.exe.
The initial date/time can be specified as a string in yyyy-MM-dd HH:mm format, or by specifying a file whose timestamp can be used.

 

 

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: 2021-01-27; loaded in 0.0077 seconds