|June 29, 2008||• FlushBin.bat (for Windows XP) uses Windows' Disk Cleanup Tool (CLEANMGR.EXE) to completely automate flushing temporary files, IE's cache, leftover ChkDsk files and the Recycle Bin.
Unlike similar batch files found elsewhere, this one does not require any user interaction to create a cleanup job, but instead writes one directly to the registry.
Read more on adding modules to cleanmgr.exe, which should also help explain how this batch file creates its temporary cleanup jobs.
Read the comments in the batch file to learn how to modify the list of selected actions for this batch file.
|June 27, 2008||• My wife often complains about strange error messages she can't remember.
So I decided to write her a screen capture script that will store a screen dump without any interaction: Capture.bat.
Whenever she gets an error message, she can now save it and show me the exact message to investigate.
The actual work is done by IrfanView, the batch file only functions as a wrapper.
To use it, create a shortcut to the batch file in the Quick Launch Tray, and make sure it runs minimized. Now each time you click the shortcut in the Quick Launch Tray, a screen dump will be appended to a multi-page TIF file named "capture.tif". Unless an alternative directory is specified on the command line, this TIF file will be located in C:\
|June 26, 2008||• In the category "Learning By Mistake(s)", I wrote CkBkSchd.bat, a batch file that lists the status of all Scheduled Tasks that have the word "backup" in their names.
Never assume that your scheduled backups perform flawlessly just because they don't popup error messages...
• I added a new Internet section to my Batch File Scripting Techniques page.
• I also added a new (subsection and) page to my VBScript Scripting Techniques section: How to force a script to run in CSCRIPT.
|June 21, 2008||• It's summer, and today I uploaded a new page on controlling DDE servers from the command line, i.e. controlling programs that often don't support command line control. Think making Word or Excel print a file...|
|June 19, 2008||• A milestone for this site: early this morning the 2,000,000th visitor since July 2007 was counted.
• I updated GetPrint.vbs, my latest script that will list the print commands for all registered file types:
• If you ever need to write WMI queries in PowerShell, give Ed Wilson's PowerShell Scriptomatic a try.
Find more PowerShell Tools here.
• Today I discovered ClassExec, a command line utility to execute any command (including DDE commands) associated with a file type or extension.
Use it to open, print, view or edit files, whatever is registered for that file type in
On my computer, I have 3 programs available to open .DOC files: Word Viewer, WordPerfect and OpenOffice Writer.
I found ClassExec while searching for another utility: CMCDDE.EXE, a command line tool to send DDE commands to any DDE server. It used to be available at http://www.istri.fr/service_client/utilitaires.html but not anymore...
|June 18, 2008||• I was searching the registry for a print command, when it dawned on me that a quick adaptation of my GetRunDl.vbs script could do this for me.
That's how GetPrint.vbs was born.
Run it in CSCRIPT.EXE (*) without command line arguments to list the Print and PrintTo commands for all file associations in the registry.
(*) Do not use WSCRIPT.EXE! Believe me, you don't want a list of these proportions in a single dialog box.
|June 16, 2008||• Oops!
Today I discovered and corrected some serious "copy/paste errors" in the HTML code for images in my SecEdit page; these errors rendered the images completely invisible in Internet Explorer 6 (and maybe in earlier versions too). The images should now be visible again in all browsers. Please notify me if they aren't...
|June 14, 2008||• PrnPDF8.bat is a batch file that uses Foxit Reader or Adobe Reader 8 to print a PDF file unattended.
Unlike my earlier PrintPDF.bat, PrnPDF8.bat doesn't check the registry for the latest Adobe Reader version, it just assumes that either Foxit Reader or Adobe Reader 8 is installed.
This means it should also work on computers with Acrobat/Adobe Writer installed!
• Several new sections have been added to my Command Line Switches page.
|June 11, 2008||• PrintPPT.bat is a simple batch file that uses PowerPoint or the PowerPoint Viewer to open a print dialog for a PowerPoint file.
It is a spin-off of some tests I performed for my Command Line Switches page.
|June 9, 2008||• Neither MS Word, nor the Word Viewer accept print commands from the command line.
So that's where PrintDoc.vbs comes to the rescue.
Based on a script by Arnout van der Vorst, PrintDoc.vbs prints a specified Word document on the default printer.
|June 8, 2008||• IrfanView, Internet Explorer, Notepad and Wordpad sections have been added to the command line switches page.
I also added a section Related Stuff, with links to lists of command line switches that I haven't been able to verify yet (I don't have MS-Office, so it's hard to test the command line switches for MS-Office programs).
|June 7, 2008||• Today I started writing down the first part of my collection of command line switches for programs that usually aren't known for their command line orientation.
This will enable you to create "quick-and-dirty" but reliable batch files to print or convert files more easily, without the need to dig into details about COM objects.
I started with Adobe Reader, Foxit Reader, Nero Burning ROM, OpenOffice, WordPerfect and XPS Viewer, more programs will follow soon.
In the menu, the new page can be found under "batch files", "command line switches".
|June 6, 2008||• As promised, the first new addition to the Batch File Scripting Techniques section: Verify if Variables are Defined, with a few paragraphs about "hidden" environment variables.|
|June 5, 2008||• The "new" Batch File Scripting Techniques section is actually a reorganized version of the old Batch How To page.
No new pages have been added yet, but more will follow soon.
|June 4, 2008||• I wrote FileDiff.vbs to check if two files differ in size, last modified date ("timestamp") or version.
Its usage may seem a little complex, so I'll try to explain it using some examples (but you'd better read the script's on-screen help first).
In the following example, let's assume that bigfile.doc is much larger than tinyfile.txt:
In this case, the return code will be 0 ("true"), because we are comparing file sizes (
In the following example, let's assume that oldfile.doc is much older than newfile.doc:
In this case, the return code will be 1 ("false"), because we are comparing timestamps (
In this case, the return code will probably be 0 ("true"), because we are comparing file versions (
|June 2, 2008||• CloneDate.vbs has been updated.
If the target file specification includes the source file (e.g.
|June 1, 2008||• CloneDate.vbs is a script to read the timestamp (LastModified date and time) of a file (the source) and then set the timestamp of one or more (target) files to that same date and time.
This script is based on an article by the Scripting Guys in the June 2008 issue of the Dutch TechNet Magazine.
|May 31, 2008||• The Hardware Requirements page now also contains a section on checking screen resolutions.|
|May 30, 2008||• ListSDKs.bat will list all Microsoft SDKs (short name, version number and description) installed on the local computer, or, if an SDK short name is specified on the command line, the version number will be returned.|
|May 26, 2008||• After having created a Software Requirements page, almost two weeks ago, the new Hardware Requirements page was to be expected...|
|May 17, 2008||• As a spin-off of my Check Software Requirements page, I wrote 2 scripts to list all Office Viewers installed on the local computer: LstOffVw.bat which uses file version checks, and LstOffVw.vbs which uses WMI.
On my computer the VBScript/WMI version takes 78 seconds to complete, the batch file needed only 8 seconds.
• Adersoft has just released HtaEdit, an HTA editor/IDE similar to their great VbsEdit VBScript editor/IDE (which has also been updated).
• I added another script to check the version of installed software:
WSHVer.vbs checks the Windows Script Host version, and returns an "errorlevel" 1 if it is older than a specified minimum.
|May 15, 2008||• The Check Software Requirements page has been updated, and a KiXtart version of the MDACVer script was added.|
|May 14, 2008||• This site's 1000th "indexable page" (according to FreeFind's site index report): Check Software Requirements.
More techniques and samples on how to verify if software versions meet a required minimum.
|May 8, 2008||• I wrote another scripts to check the version of installed software:
WinInVer.vbs checks the Windows Installer version, and returns an "errorlevel" 1 if it is older than a specified minimum.
|May 7, 2008||• I wrote some scripts to check the versions of installed software:
MDACVer.vbs checks the MDAC version, and returns an "errorlevel" 1 if it is older than a specified minimum;
NETFxVer.bat lists all .NET Framework versions found on the local computer.
|April 7, 2008||• It seems Microsoft has removed the WSH 5.6 for Windows 9x/ME and NT 4 download from their site. Or does anyone out there know where it has been moved to?|
|April 5, 2008||• On my Unattended Installation Procedures for Specific Software page I added a section on silent installations for OpenOffice.|
|April 4, 2008||• In my new SeCEdit page I explain how to use SeCEdit and MMC to set the security on files, folders and even on registry keys with batch commands.
I recently learned this technique from Adriaan Westra, who has used it successfully on Windows 2000, XP and Server 2003.
Thanks again, Adriaan.
|Archived news from 2008 Q1|
|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|