Home > Blogs > VMware ThinApp Blog


Adding Thinreg to the Windows Explorer Context Menu

If you spend a lot of time building and testing ThinApp
packages, you may have a use for this handy utility.  By installing ThinReg Helper, you can add
thinreg.exe’s functionality directly to Windows Explorer, saving you the effort
of running batch scripts manually, typing long paths into a command window, or
waiting for local installs to test ThinApp’s ThinReg functions on new packages.

Clip

The attached installer does the following:

It installs two batch files in your destination folder,
“thinreg.bat” and “unthinreg.bat”.  Both
of these have a similar structure to ThinApp’s standard build.bat file.  There is logic inside that determines if
ThinApp is locally installed and if not, it relies on the THINSTALL_BIN
environment variable to locate thinreg.exe.

Once the two batch files are installed, the installer needs
to add their functions to the context menu of Windows.  This is done by populating the following two registry
keys:

HKEY_CLASSES_ROOT\exefile\shell\ThinApp (Register)

HKEY_CLASSES_ROOT\exefile\shell\ThinApp (Unregister)

Adding the keys here makes sure that the context menu only
applies for EXE files, and not for other file types.  Below each key, a ‘command’ key is created
with a value of:

[Your Install Folder]\thinreg.bat "%1"

The %1 allows us to pass the path of the ThinApp EXE you
wish to register back to the batch file for processing.

The final step is handling users who run ThinApp directly
from a network share.  In this scenario,
the THINSTALL_BIN environment variable must be populated, and this can be done
by installing the ThinReg Helper Windows Installer file like this:

Msiexec /I “ThinReg Helper.MSI” THINAPPBINPATH=”Z:\ThinApp 4.5”

THINAPPBINPATH is a Windows Installer Public Property that when
populated instructs Windows Installer to write the required Environment
Variable automatically.  You can also
optionally run the install silently by adding /Q, or /QB if you would like a
confirmation dialog box at the end of the install.

Uninstalling ThinReg Helper should remove the batch files, the
registry keys and the environment variable.

Download ThinReg Helper

I hope you enjoy this tool, and please let us know if you
have any questions or comments!

DISCLAIMER!

This site may contain information about third party products, services, tools and/or applications that are not owned or controlled by VMware. VMware does not endorse or make any representations or warranties about such third party products, services, tools and/or applications referenced in this site. Any issues with third party products, services, tools and/or applications should be taken to the respective support department.