TabPlayer goes portable.

One of my favorite programs is TabPlayer, which plays guitar tablature files. At first glance this program appears to be portable as it saves its settings to an INI file within the same program folder but I soon discovered that it saves its installation path to the registry in a key called TabPlayer under HKEY_CLASSES_ROOT. By default the path is C:\Program Files\TabPlayer, but you can easily change it to its folder on your USB drive. If you don’t feel comfortable messing with your registry, you can paste the following to a .reg file and change the location from there.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\TabPlayer]
“installpath”=”I:\\briefcase\\Music\\TabPlayer”

Just double-click on the resulting .reg file and the changes will be written to the registry.
TabPlayer leaves behind quite a bit to clean up in the registry as it registers itself to be the default player for various tab files. I created an AutoIt script that does all the dirty work.

RegDelete (“HKEY_CLASSES_ROOT\TabPlayer”)
RegDelete (“HKEY_CLASSES_ROOT\TabPlayerBassTab”)
RegDelete (“HKEY_CLASSES_ROOT\TabPlayerGuitarTab”)
RegDelete (“HKEY_CLASSES_ROOT\.btab”)
RegDelete (“HKEY_CLASSES_ROOT\.crd”)
RegDelete (“HKEY_CLASSES_ROOT\.gdf”)
RegDelete (“HKEY_CLASSES_ROOT\.tab”)
RegDelete (“HKEY_CLASSES_ROOT\.tp3”)
RegDelete (“HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.btab”)
RegDelete (“HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tab”)
RegDelete (“HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.crd”)
RegDelete (“HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.gdf”)
RegDelete (“HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tab”)
RegDelete (“HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tp3”)
RegDelete (“HKEY_USERS\S-1-5-21-1292428093-1993962763-839522115-2640\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tab”)
MsgBox (4096, “TabPlayer”, “Done!”)

I saved the above script as tabplayer.au3 and have it stored in my scripts folder. Then I made a VBScript that launches AutoIt and runs the tabplayer.au3 script.

Set objShell = CreateObject(“Wscript.Shell”)
objShell.Run(“I:\briefcase\AutoIt3\AutoIt3 I:\briefcase\scripts\autoit\tabplayer.au3”), 1, TRUE

I saved this script as cleanup.vbs. From now on, before I run TabPlayer, I double-click on the tabplayer.reg file to write the installation path to the registry. Then I run TabPlayer as usual. When I’m done, I run the cleanup.vbs script to remove the extra registry entries, leaving absolutely nothing behind.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s