nicholas-ross/SSMS-Schema-Folders

Question: Profile-specific add-ons. Is it possible?

kristianoye opened this issue · 2 comments

I love having this functionality and I want to install it on a shared terminal server but I don't want to force others to use it if they don't want to. Is there a user-specific directory somewhere in my user profile where I can drop this add-on so that it only applies to me?

Unfortunately no, but there may be a way.

There is a setting in the options which controls if it is enabled and it defaults to on. If you use Visual Studio then you can download the source code and change SchemaFolderOptions.cs Enabled to false.

If you don't want to modify and build source code then I have another way but not sure how reliable it is.

The .pkgdef file must exist in the ssms extensions folder. This file says where to find the .dll file for the extension. If the location of the .dll file doesn't exist then it won't load.

Download, unblock and extract the extension to your \Documents\SQL Server Management Studio\Extensions folder. (I created the extensions folder but you can use other locations if you want.)

Make a copy of the SsmsSchemaFolders.pkgdef file and rename it SsmsSchemaFolders-UserProfile.pkgdef. Edit the new file with a text editor and change "CodeBase"="$PackageFolder$\SsmsSchemaFolders.dll" to "CodeBase"="%USERPROFILE%\Documents\SQL Server Management Studio\Extensions\SSMS Schema Folders\SsmsSchemaFolders.dll". Move the new .pkgdef file into the ssms extensions folder.

The %USERPROFILE% environment variable will resolve at runtime to the current user. If other users want to use the extension they can install it to the same folder in their own profile.

Many thanks for the possible work-around. I took a quick vote and the others on my team were willing to try the plugin out! I will try this out if they end up wanting me to revert it.