Donate Bitcoins

exetype 1.1 has been released

To automate the creation of .lnk files to Windows GUI applications, I needed a way to programatically determine the type of an .exe. So I wrote exetype.

You can download the binary here and the source code here.

Binaries for OpenSSL 0.9.8b for Windows Released

Details here.

Binaries of Apache 2.2.2 for Windows with OpenSSL 0.9.8b (mod_ssl) and mod_deflate support

Details here.

Binaries of Apache 2.0.58 for Windows with OpenSSL 0.9.8b (mod_ssl) and mod_deflate support

Details here.

mklnk 1.2 has been released

I needed an easy way to create .lnk files on the command line, and couldn't find one online that suited me, so I crafted my own.

You can download the binary here and the source code here.

Automating the building of a BartPE bootable disk (updated for pebuilder 3.1.10a)

To automate the tedious process of building a bootable BartPE disk, I created the Makefile pebuilder.mak to build a BartPE disk with a single command.

To build the disk, all you need to type is:

$ make -f pebuilder.mak

The Makefile, and the supporting files are available as

Of course, to run make, you will need to install Cygwin and select the make and wget packages. Alternatively, you could unzip, which contains only the executables needed to run make.

It helps speed the build process by telling pebuilder to not build the .ISO. It then calls InfCacheBuilder, and then calls mkisofs. Finally, it calls cdrecord. A Windows version of cdrecord is available as

Also included is inirw.exe, a small C program I wrote to read and write .ini files. inirw.exe is also available separately (including source) as

Motorola Phone Tools 4.0.4 doesn't transfer home phone numbers

I was importing a vCard file, and found that the Motorola Phone Tools software didn't transfer any of the home phone numbers.

To fix this, I loaded the .vcf into my text editor, and changed all occurances of




and saved the file. I then imported the data as usual.

Then when attempting to voice dial, the phone was choosing to dial email addresses and fax numbers, so I wrote the perl script

/^EMAIL/ && next;
/FAX/ && next;

which I run via:

perl -ni.bak $1

This script is available here.


Better living thru VMWare

For our last trip to India, we didn't want to lug two laptops around. So I backed up my laptop using Ghost 9, and then ran VMWare Workstation, and imported the backup image into a vmware session, and copied that to my girlfriends system.

Next, I installed VMWare Player on her system, and loaded the image.

Here comes the fun part. While we were travelling, we would visit an internet cafe. She would plug in her laptop, and power up. I'd fire up VMWare Player, and find out the IP address that it got assigned.

Then I'd visit another workstation, and fire up MSTSC (Terminal Services Client), enter the IP address of the VMWare session, and my username/password and voila! I was using my old laptop virtually!

Cygwin Doesn't Register All Environment Variables When Using SSH

When initiating a Cygwin bash session via SSH, Cygwin only registers the environment variables for the SYSTEM account, not for the individual user's account.

So I added the following code to the end of my .bashrc file:

if [ "$SSH_TTY" ]; then
pushd . >/dev/null
for __dir in \
/proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session\ Manager/Environment \
	cd "$__dir"
	for __var in *
		__var=`echo $__var | tr '[a-z]' '[A-Z]'`
		test -z "${!__var}" && export $__var="`cat $__var`" >/dev/null 2>&1
unset __dir
unset __var
popd >/dev/null

To apply this fix for all users, add it to /etc/profile instead.

Please note, this doesn't correctly register environment variable names that are illegal in Cygwin, such as those that contain a period.

AddPath 1.0 has been released

I've found no easy way to add directory paths to the system's PATH environment variable, so I created Here is the readme.txt file describing its usage:

AddPath 1.0 - Jan  6 2006 - 10:18:11
Copyright (c) 2005-2006, Ross Smith. All Rights Reserved

Usage: AddPath [options] path [path2 ...]

-v VarName Append path(s) to environmental variable VarName (default is Path)
-s         Modify variable in the system environment (default)
-u         Modify variable in the current user's environment
-d         Modify variable in the default user environment
-e char    Change % substitution character to 'char' (default is ~)
-n         Don't add path if the variable already contains it
-p         Prepend path(s) to variable
-r         Replace the value (default is to append)
-x         Use REG_EXPAND_SZ type (default if ~ char is used)
-z         Use REG_SZ type (default)
-c         Show version and copyright statement
-?         Show this help screen

  rem append c:\bin to the system Path variable:
  AddPath -n c:\bin

  rem prepend c:\usr\local\bin and c:\bin to the system Path:
  AddPath -n -p c:\usr\local\bin c:\bin 

  rem Add "C:\Program Files\Java\bin" to the system Path:
  AddPath -n "C:\Program Files\Java\bin"

or, even better:

  rem add or replace JAVA_HOME with %ProgramFiles%\Java
  AddPath -n -r -x -v JAVA_HOME ~ProgramFiles~\Java
  rem Append %JAVA_HOME%\bin to the system Path:
  AddPath -n ~JAVA_HOME~\bin

Other keywords: setx, setenv



Migrating from Oubliette to KeePass

To migrate my data from Oubliette, to KeePass, I created the HTML template keypass_xml.tpl and the bash shell script

Syndicate content
Donate Bitcoins
Special thanks to Riester Rente Online for a generous donation!