|March 30, 2007||While I'm busy adding dialog windows to my VBScript Scripting Techniques section, I came accros this Hey Scripting Guys article on Browse Folder Dialogs.
I combined the 2 samples, added a choice for the dialog options and wrote it into a function: BrowseFolder.
While at it, I also converted it to KiXtart.
Thanks, Scripting Guys
|March 29, 2007||Two new contribution by Denis St-Pierre: an undocumented trick to retrieve shortcut properties and some self-destruct code (grown-ups, don't try this at the office).
Thanks again, Denis.
It seemed only logical to combine the dialogs to retrieve passwords and user input to create a new login dialog, so that's exactly what I did.
|March 26, 2007||Denis St-Pierre sent me a nice improvement for standard kill-process scripts.
This one waits till the process is actually "dead".
|March 25, 2007||After seeing a script by Stephan King using Internet Explorer to create a custom dialog I wrote a new function to retrieve passwords in VBScript.
While Windows XP's
By using Internet Explorer, the function can be used in any ActiveX scripting engine, including HTAs.
And only some minor modifications were needed to create a dialog screen that prompts for "normal" user input, i.e. an alternative for the
|March 24, 2007||I just added a link to the PowerShell WMI Explorer by The PowerShell Guy to my Code Generators page. PowerShell WMI Explorer combines the best features of WBEMTEST and Scriptomatic, for PowerShell.|
|March 23, 2007||Oops!
It seems I hadn't tested enough before writing the ZipFolder function. The only improvement compared to the Zip function is that ZipFolder stores the entire path, whereas Zip only stores the path relative to the "starting point".
To ZIP an entire folder, including subdirectories, without the full path, use:
To ZIP an entire folder, including subdirectories, with the full path, use:
I'll merge these two functions soon.
Today I also added IsLaptop, a script to check if a computer is a laptop, by checking if it has a battery.
|March 22, 2007||I added a function to ZIP folders in VBScript.|
|March 19, 2007||After having found a way to create CAB files through VBScript I started searching for similar code to create ZIP Files in VBScript.
I found lots of useful components on Belus Technology's website, and the one for creating ZIP files was just what I was looking for.
But while browsing through their documentation I also experimented with X-MD5 for MD5 checksums and X-HTTP to check if websites are up-and-running and to download files.
A project of mine that had come to a halt due to other priorities and the flu has now been added to this site: an introduction to working with XML files.
I also added several "new" CSS/web editors to my list of script editors.
|March 15, 2007||I just wrote and uploaded ProgIDs.vbs, a VBScript to list all ProgIDs available on the local computer.
New, too, is the page on creating CAB Files in VBScript.
|March 10, 2007||Not much news this last week.
I (no, not my computer) was struck by the latest influenza virus, so you might say I was in the news when it was officially declared to be an epidemic in the Netherlands, last Tuesday.
Though not entirely recovered yet, my head was clear enough today to write some script code again.
I often have to convert lots of WordPerfect documents to PDF.
My personal motto is "when you perform a task for the third time, consider automating it", so that's what I did: WP2PDF.VBS.
|March 2, 2007||Today I added 3 new pages to my VBScript Scripting Techniques section: SortedLists, Wake up computers with UltraWOL and FileSave dialog, and updated the FileOpen dialog page.
And runNhide.vbs, a script to run commands in the background. It was based on a similar script by Alistair Johnson, I just added basic command line checking and the possibility to use multiple command line arguments.
Thanks Alistair Johnson
|February 27, 2007||I added 2 new pages to my VBScript Scripting Techniques section: working with (remote) registry and Using object browsers.
I rewrote my own Txt2Src tool, which I use whenever I want to display source code, or text witch accented letters, in HTML pages.
The original version was written rather clumsily in Rexx, but this new VBScript version is much faster, and easier to maintain. It is available on the WSH samples page.
|February 20, 2007||I added a new batch file today, DispEDID.bat (a "translation" of the VBScript version), which retrieves your (or anyone else's) monitor's EDID asset information from the registry.
Here's a sample of what its output looks like:
The script is built on information from a VBScript by Michael Baird (link no longer available).
Thanks again, Michael.
|February 15, 2007||Now that the first deadline for the TechNet Script Center's Scripting Games MMVII has passed I released the source code for my Roman Numerals Convertor.
I also added the conversion subroutines used in that HTA to the code snippets in my VBScript Scripting Techniques section.
I updated Hardware.hta with monitor inventory, as promised yesterday.
|February 14, 2007||Oooops.
I completely forgot about the TechNet Script Center's Scripting Games MMVII that run from February 12 - 23, 2007, and missed the first deadline today.
You can still join. I did. Don't miss it!
I also added a new script today, DispEDID.vbs, which retrieves your (or anyone else's) monitor's EDID asset information from the registry.
The script is heavily based on a similar script by Michael Baird (no longer available), which I partly rewrote to use it in an upcoming update of my Hardware.hta.
|February 13, 2007||While at the subject of automating WordPerfect, I couldn't ignore the current market leader, now could I?
So I added automating MS Word to my VBScript Scripting Techniques section while my Office 2007 trial version lasts...
|February 12, 2007||I added a page on automating WordPerfect to my VBScript Scripting Techniques section.
I also corrected an error in DATEADD.BAT. And while working on it, I also rewrote the batch file to use today's date when no date is specified.
|February 11, 2007||The first release of my WMI script samples section is available.|
|February 9, 2007||I have been playing with Microsoft's Calendar HTML Component, and as a spin-off created CalDemo.hta.|
|February 8, 2007||I added a page on Services to my VBScript Scripting Techniques section.|
|February 7, 2007||I started reorganizing my Batch Files section.
The DOS commands have all been moved to my new Batch commands subsection. As a result, the Batch Files menu already looks a little bit less cluttered.
Most of the other batch related pages will be moved to a new "Batch Scripting techniques" subsection under construction.
|February 6, 2007||I added Send e-Mail Messages to my VBScript Scripting Techniques section.|
|February 3, 2007||With this tip from Yehuda Shiran, Ph.D., I finally managed to get my Print "button" working in Internet Explorer.
Thanks Yehuda Shiran.
|February 2, 2007||I added File Open Dialog to my VBScript Scripting Techniques section.
I also added a note on using GNU WGET on my FTP page.
|January 31, 2007||I added some new "snippets" to my VBScript Scripting Techniques section:
|January 30, 2007||Since VBScript (WSH), PowerShell, KiXtart, Object Rexx and even XP batch files (WMIC) now all support WMI and (except batch files) ADSI, I decided to move the ADSI & WMI related samples and links to a separate ADSI & WMI section.
The ADSI & WMI samples selection will follow soon.
Abu Shafwa from Indonesia wanted to know how to set a bitmap as the Windows wallpaper.
I already had a Wallpapr.bat that sets a random bitmap as wallpaper, but no sample yet that sets a specified bitmap as wallpaper. Besides that, Wallpapr.bat is broken in Windows XP because XP demands backslashes in .REG files to be escaped.
So I wrote SetWallp.bat which requires a bitmap as command line argument, and has been tested in Windows XP Professional SP2 only.
|January 27, 2007||Ron Bakowski sent me some sample batch code using advanced date math.
He used Julian dates to perform the math on, and then converted the result back to "normal" (Gregorian) dates.
The Julian date conversions used are based on the Fliegel-Van Flandern algorithms from the Astronomical Almanac, and provided by Doctor Fenton on the Math Forum.
The sample code Ron sent me deletes all files older than a specified number of days. However, it works only on computers using the US date format. We'll try to "internationalize" the code, and place it on my "Third party batch files" page.
In the mean time, this whole Julian date stuff inspired me to write DateAdd.bat (adds a number of days to a date) and DateDiff.bat (calculates the difference in days between two dates).
Thanks Ron, and thanks Doctor Fenton.
|January 26, 2007||I added some code snippets to my VBScript Scripting Techniques section: Arrays and ArrayLists.|
|January 21, 2007||Michael Lee sent me a link to Renegade's Random Tech blog, which explains how to use Windows XP's native IExpress script packager.
Thanks Michael, and thanks RenegadeTech.
I added a print "button" at the bottom of the navigation frame.
Clicking "Print" in the navigation frame at the left will print the page in the main frame at the center/right.
Sorry, it doesn't seem to work in Internet Explorer 7 (prints the navigation frame instead of the main content frame).
|January 20, 2007||I added a new subsection to my Windows Script Host (WSH) section: VBScript scripting techniques.
Here I intend to store an ever expanding collection of VBScript code snippets and howtos, indexed by their functionality.
The first subject is retrieving names: computer names, user names, and domain or workgroup names.
If all goes well, many more will follow soon.
I think I may have solved the dilemma of using or not using the
As you may recall, using this switch meant trouble if multiple PDF files were printed all at once, not using it meant leaving a minimized Adobe/Acrobat Reader window open which had to be closed manually.
I solved the dilemma by adding a little "intelligence" to the batch file.
As of version 3.10, a
Also added in the new version: support for wildcards. The batch file will check if the wildcards translate into multiple files, and, if so, won't insert the
Finally, a piece of code was added to check if an Acrobat Reader window is open, and, if so, leave out the
In short: need to print all PDF files in a directory?
|January 15, 2007||Michael Butler has been testing my recently updated PrintPDF.bat and wasn't too happy with the added
Without this switch, a minimized Adobe reader window would remain opened after the printing was done, but when printing many PDF files, all files would be handled by this single Adobe Reader "instance".
Seems I'll have to rethink this batch file.
In the mean time, read the note I added below the PrintPDF.bat explanation, so you can decide for yourself whether you want to use the "old" or the new code.
|January 10, 2007||Fabio Quieti sent me a tip to improve my PrintPDF.bat.
Up till now, this batch file would print a PDF file and leave a minimized Adobe Reader window open which had to be closed manually.
By inserting a
|January 5, 2007||I added some Batch File Search Engines to my web site.
These are actually 3 different Google Co-op search engines, customized to search for "all" batch code, NT batch code or DOS batch code.
I will be constantly tuning these search engines, if you think I omitted a relevant website in the lists to be searched, just let me know.
|page last uploaded: 2018-04-16, 10:52|