Get the new PortableApps.com Platform 12.0.3. Better, stronger, faster, and prettier. Download Now or Buy on a Flash Drive
Instant access to over 300 free and legal portable apps (over 9GB) including the new Solfege (Aug 30, 2014)
PortableApps.com needs your help: Please consider making a donation today

MySQL Workbench 5.2 GA Portable

PatPeter - October 27, 2010 - 9:11pm
Share on Facebook

MySQL Workbench works pretty well on a flash drive, the only problem is that it saves a considerable amount of user data to the computer:

C:\Users\%USERNAME%\AppData\Roaming\MySQL\Workbench

Folders:
libraries
modules
scripts
snippets

Files:
connections.xml
server_instances.xml
shell_bookmarks.txt
shell_history.txt
starters_settings.xml
user_starters.xml
wp_options.xml
wb_state.xml

The noinstall archive works best for running off a flash drive:

http://dev.mysql.com/downloads/workbench/5.2.html

I could not find an option in Workbench's settings to specify the AppData directory.


( categories: )

success

After doing some research, I've found that the workbench sets C:\Users\%USERNAME%\AppData\Roaming\MySQL\Workbench based on the USERPROFILE environment variable. To make it portable I created a batch file in the MySQLWorkbench directory with the following contents:

SET USERPROFILE=%CD%
START MySQLWorkbench.exe

This has the result of creating/referencing the files in:
%CD%\AppData\Roaming\MySQL\Workbench

So I'm sure it'd be easy enough to make a laucher that does the same. And it makes more sense to me to do it this way rather than checking for exisiting files and doing a backup and restore, as one wouldn't have to worry about an unclean exit.

The one thing to be aware of is that the windows port of the workbench depends on the .Net framework. So not likely there will be an official portableapps release.
On that note, it'd be nice to have portableapps.net site for .net apps. I realize that the .Net framework itself isn't portable (though silverlight may hold some promise in that regard) but I work almost exclusively on systems that have the framework installed and have customized a handful of apps to PAF.

I did this using the MySQL Workbench 5.2.30 CE "no install" zip package on Windows 7.

A small enhancement for the Start-Script

Good Job.
A small enhancement of the start script to create the
directory "%CD%\AppData\.." if it not exists.

@echo off
REM Portable Startscript for MySQL Workbench
SET USERPROFILE=%CD%
IF NOT EXIST "%CD%\AppData\Roaming\MySQL\Workbench" MD "%CD%\AppData\Roaming\MySQL\Workbench"
START MySQLWorkbench.exe
REM This close the DOS Box after starting the Workbench
EXIT

The exit command can be remarked for debuging Smiling

Regards Hugo

You have...

You have... no idea what alternative measures I took with this program. I created a batch script to replace the old drive letter in all XML files with the new drive letter from computer to computer, followed by copying the files to the computer and back to the thumb drive. Thank you so much.

PortableApps.com Launcher

The PortableApps.com Launcher is designed for taking care of things like that.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Launcher

I suggested that in my original post. I personally don't use the app that often, and, as I mentioned, it requires the .Net framework, so not really "portable", so didn't feel like taking the time to make a launcher.