Rob van der Woude's Scripting Pages

News Archives 2008 Q1


[ Back to the current news page... ]


March 30, 2008 • I added a list of file viewers to my site.
March 28, 2008
• My web counter has registered over 1.5 milion visitors to my site since its "make-over" in July last year. It seems there is a market for scripting.

• Yesterday, after I updated my Firefox browser, all my add-ons were gone!
It seems I'm not the only one facing this problem. This article by Thomas Freudenberg explained how I only needed to delete 3 files from my Firefox profile to restore the add-ons.
Because locating these files in the Firefox profile may take a while, and I probably wouldn't remember the solution next time, I wrote a batch file to perform this task: AdOnGone.bat. In Windows XP and later, it will even warn you if Firefox hasn't been closed yet.

• While playing with Firefox profiles, I also wrote FlushFxC.bat, which flushes the Firefox cache for the current (Windows) user.
Careful, though: if you use this batch file without closing Firefox, you may need to manually purge Firefox's cache (Tools menu, Options, Privacy tab, Clear Now button, deselect everything but Cache, OK button) to reenable display of pictures in web pages.
More or less "related stuff": MR Tech's about:about plugin for Firefox will give you access to Firefox's many about configuration/settings pages through the Help menu.

• To protect their users/computers against macro viruses, many companies disable VBScript by associating .VBS files with notepad.exe instead of wscript.exe or cscript.exe. If a user doubleclicks a .VBS file, the script will open in Notepad instead of being executed.
Sometimes, however (think "software installation"), it would be useful to temporarily associate .VBS files with cscript.exe again.
That's why I wrote VBSAssoc.bat, a batch file that will do just that.
When run, it first creates a temporary batch file "restore_vbs_assoc.bat" which can be used to restore the current file association, and then changes the association for .VBS files to cscript.exe.
Don't forget to run "restore_vbs_assoc.bat" after the installation is finished.
March 24, 2008 • A minor update to GetUnins.vbs: it can now also query remote computers.
March 14, 2008 • If I can read Excel files without using Excel, why not try and read MS-Access databases without using MS-Access?
Behold: AccessRd.
March 12, 2008 • My new PwdNoExp.bat sets a local user's password to never expire.
Unlike the VBScript version I wrote several months ago, the batch file uses WMI for the job.
March 8, 2008 • I wrote a sample VBScript function ReadExcel which uses ADODB to read Excel files.
Using ADODB, it is possible to read Excel files even on computers that don't have MS-Office installed.
February 22, 2008 • Michael Kahle corrected an error in the leapyear code of Tomorrow.kix.
Phew, that was close Smiley

Thanks, Michael
February 15, 2008 • Make sure you get started on the first two events of the 2008 Scripting Games in time. Your first two scripts (per section) are due Wednesday.

• Now may be a good time to download trial versions of the more advanced editors/IDEs for your scripting languages of choice.
Have a look at VBSEdit, PowerShell Plus and Komodo Edit. Or PrimalScript if you prefer a single IDE for multiple languages.
More scripting editors and IDEs can be found on my Script Editors page.
February 6, 2008 • Did you know that the 2008 Scripting Games, starting February 15, now also include a Perl division, besides VBScript and PowerShell?
February 3, 2008 • Oops! I just found out that I forgot to upload IsNumber.bat, the addition of January 11.
Sorry about that. The downloadable source code is available now.
February 2, 2008 • Get ready for the 2008 Scripting Games, starting February 15, 2008!
This is mainly to remind myself: last year I missed the first 2 challenges because I just forgot (that's when I started using Mozilla's Sunbird calendar software).
You are all invited to join. It's fun, and you'll learn a lot in the process.
February 1, 2008 • The flu hit me again, so I have kept a little quiet the past couple of days. I'm lagging behind answering my e-mails, be patient, please.
January 22, 2008 • I have been looking at automation of burning CDROMs and DVDs with IMAPI; you'll be hearing more of this from me!
In the mean time, try the working sample scripts for yourself.
January 20, 2008 Print.vbs can print any file that has an associated print command in the registry; not unlike my PrintAny.bat but thanks to COM scripting much simpler. Unfortunately, like the batch file, this VBScript version doesn't close the programs it uses either, so you may be left with an opened Adobe Reader window after printing a .PDF file.

• While on the subject of printing: I added a Printing section to my VBScript Scripting Techniques page.
January 19, 2008 • I started a new section on unattended & silent installations.
Here I will collect (links to) commands and techniques to automate software installation.
A separate page is dedicated to unattended installation commands for specific software products.
January 17, 2008 Recycle.vbs is a script that sends the contents of a folder to the Recycle Bin.
Depending on the /V command line switch it will ask for confirmation once or for each individual file or subfolder.
January 14, 2008 • Remember the (now expired) SnagIt offer?
I installed Snagit and "ordered" a key, and discovered that it is fairly easy to automate SnagIt screen captures.

• I know, totally off topic, but you may be interested all the same: Microsoft's new Color Control Panel Applet (XP only) helps you manage Windows color settings in one place.
January 11, 2008 IsNumber.bat checks if a specified value is numeric or not, and returns an errorlevel that depends on the type of number (0=NAN, 1=batch file error, 2=binary, 8=octal, 10=positive decimal integer, 11=negative integer, 16=hexadecimal).
To check for a number in general use:

SET Val=1279
IF ERRORLEVEL 2 ECHO %VAL% is a valid number

To check if a number is octal, use:

SET Val=1270
IF %ERRORLEVEL% EQU 8 ECHO %VAL% is a valid octal number

• I fixed a problem with the "new" date formats in XP in my Easter.bat (sorry, it has been a long time since I last used it).

Thanks Patrick Kleinknecht, for reporting this bug
January 9, 2008 • For a friend I wrote APIPA.vbs, a VBScript version of my APIPA.bat with a much simpler interface.

• Just to experiment with CAPICOM and certificates I wrote ListCert.vbs. I was amazed seeing the number of installed certificates.
January 6, 2008 • I updated GetUnins.vbs: I added the Install Dates of the packages to the output.
January 2, 2008 • Learn how to obtain a free SnagIt 7.2.5 license plus 50% off the regular update price for the latest version. Offer expired January 7, 2008.

GetRunDL.vbs is a script, similar to GetUnins.vbs, that lists all RUNDLL and RUNDLL32 commands associated with file types in the registry.

PWGen.vbs is a script that uses CAPICOM to generate passwords of a fixed length from a random string.
Does someone keep asking you for password resets? Be cruel and have fun:

CSCRIPT.EXE //NoLogo D:\MyTools\pwgen.vbs 32


Adriaan Westra taught me how to suppress reboots when installing .MSI files from the command line:

MSIEXEC /i myfile.msi /qn REBOOT=ReallySuppress

Using STRINGS I found more undocumented (?) arguments, so I decided to devote a separate page to MSIEXEC.
January 1, 2008 • Happy New Year!
May 2008 bring you joy and happiness.

• My first new script this year is GetUnins.vbs, a script that lists uninstall commands for all programs installed on the local computer, or searches for specific uninstall commands.
I needed some uninstall commands because I had to reinstall all .NET Framework versions after a failed Windows update.
In this case I used Aaron Stebner's Removal tool to fix .NET Framework install failures, but while looking for a solution I discovered the location of uninstall commands in the registry, and hence wrote GetUnins.vbs.

• The second script of 2008 is WUpdHist.vbs, which lists or queries the Windows Update history.


Archived news from 2007 Q4
Archived news from 2007 Q3
Archived news from 2007 Q2
Archived news from 2007 Q1


page last uploaded: 2016-09-19, 14:57