NX is great. I’m deeply in love with it. Sometimes it’s acting like a real jerk, though. The NX Web Companion is installing a lot of crap into the active user’s profile. The NX client writes stuff in the active user’s profile. Both isn’t really convenient for me.
I prefer to have all my settings with me on a USB thumbdrive. So, in the spirit of PortableApps I’ll show you how to simply turn NX into a portable application.
First thing to do is installing NX client on a machine, if you have installed already – that’s fine. Copy the entire program folder to a new directory structure like NxClientPortable\App (I’ll follow the PortableApps schema here). In NxClientPortable create a new directory named “Data” and a batch file with the following contents:
@echo off
set USERPROFILE=%CD%\Data
App\nxclient.exe %*
reg delete /f /va "HKCU\Software\Cygnus Solutions"
reg delete /f /va "HKLM\Software\Cygnus Solutions"
That’s it. Start the batch file and you’ll be fine. No need for installations, no files in some stranger’s profile. Everything goes back to your thumbdrive neatly.
This example also demonstrates why batch still isn’t dead: The USERPROFILE variable will be changed just within the scope of our batch file, all other applications will still use the path specified in the “global” instance of the variable.