ID #1185

How can I run SQLyog from a portable drive.

With a normal installation SQLyog will (since version 6.06) not write its configuration file ('SQLyog.ini') as well as the 'favorites' folder and the local SQLite databases used for some advanced client-side fetures (auto-complete, column-width persistense in GRIDs etc.) to the installation folder, but to user's 'AppData' folder. This is required when running on Windows Vista and higher if the Windows UAC ('User Account Control') feature is turned on. With this feature turned on even an 'administrator' user will normally not be allowed to write to the 'Program Files' folder tree. Instead Windows will - in case of changes to the files - 'virtualize' - ie. write to a special 'virtualized' folder. This will cause mismatch and confusion as multiple and different copies of the same file would exist on the system - and the most visible ones would not be used.

Since version 8.13 SQLyog supports a -dir parameter. The -dir parameter tells where SQLyog will look for and create files that are not read-only. This option can be used to specify the path where SQLyog will create these files.

You simply need to specify the filepath (addressed absolutely or relatively to the SQLyog executable) after the -dir parameter. Like

SQLyog -dir"path"
.. to specify the path where SQLyog writable files are stored.

In the particular case where you run SQLyog from a removable drive you will probably not be able to to know in advance the drive-letter of the removable drive. So here you should use relative file paths. If there is \SQLyog folder on the removeble drive and a \SQLyog\Files folder where the files should be, the command to start SQLyog would be simply

SQLyog -dir"Files"
(using relative addressing and assumed that you already cd'ed to the installation folder)

If you don't want to use command syntax but start SQLyog from a program icon then after normal installation (using the installer) you may copy and right-click a program icon/shortcut (on desktop or in start menu) and edit the command from the 'properties' menu.

The -dir switch can also be used if you want to save all SQLyog-related files to an encrypted driver or folder - or if you for any reason want another file position than the default. But note that if you are using Vista or higher and have UAC turned on you should not specify a folder in the 'Program Files' folder tree (or 'Program Files (x86)' on 64 bit Windows).

Categories for this entry

Tags: -

Related entries:

You can comment this FAQ