Sublime Forum

Setting an alternate data_path location

#1

My organization uses Microsoft Application Virtualization (App-V) to install applications on our virtual desktops - as a result, when Sublime Text gets installed the data_path ends up being part of the virtualized application package, and is overwritten each time the machine reboots.

Is there a way to tell Sublime Text to use an alternate location as the data_path? I’ve tried using --data on the command line, but this doesn’t seem to be making a difference. (Sublime text just opens the directory named as the workspace, and looking at the console all of the paths are still set to the defaults.)

I’m aware that I could use the portable version - but this is contrary to company policy, and it doesn’t fully integrate into the shell - as all of those links are setup to use the virtualized application.

I’m running Sublime Text 4 (build 4122).

Thanks,
-John Clark

0 Likes

#2

ST either stores packages, license and user preferences in %APPDATA%\Sublime Text (normal setup) or [installdir]\Data (portable) expecting those to be persistent.

The only way to re-target the whole directory or some sub directories is to replace folders by symlinks/junctions to other directories - maybe using a script executed before starting ST the first time after login.

0 Likes

#3

Thanks for the reply - unfortunately “they” don’t give us sufficient privileges to create a symlink to replace a directory found within the virtualized application - so that’s not going to work.

What is the story with the --data command line parameter - was that only supported by earlier versions of Sublime Text?

0 Likes

#4

I am not aware of an --data argument nor is it printed via subl --help.

Even if you’d redirect whole data directory on application or filesystem level, you’d loose all packages/settings/license deployed via App-V package.

IMHO, the overall issue is to be fixed by how your ST App-V package is designed or deployed.

There are ways to use and persist information from %APPDATA%.

One possibility would be folder-redirection (see: https://learn.microsoft.com/en-us/microsoft-desktop-optimization-pack/app-v/appv-planning-folder-redirection-with-appv) Not sure it’s the most smart solution though.

0 Likes

#5

Well, I agree that the problem is best resolved with changes to the App-V package, but the appetite for changing that is low - which is why I was looking for a workaround.

I did further digging into the --data argument - I found this on a couple of websites, but eventually discovered that this argument was only available in v1 of ST.

Thanks for the help though - it is much appreciated - I would have been chasing that for a while without your guidance.

0 Likes