I've faced a similar issue today. I haven't got a fully automated solution since I haven't need it, but I think I've collected enough information so you'll be able to correctly prepare a small application that can do it.
Starting at Visual Studio 2017, the configuration is no longer stored in the central registry but in a private file, located at %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_ <somekind_of_id>\privateregistry.bin
. I'm not sure how to determine somekind_of_id
(in my case it is 3eeca950
, for simplicity I've kept such value in all the paths, just replace with yours). This file is locked by Visual Studio, so it must be closed before trying to modify it (it takes VS some seconds to free the lock).
This file can be imported into an application hive using RegLoadAppKeyA
. This function will create an HKEY
that can be used together RegSetKeyValueA
to modify the values you need.
The key you are interested in is Software\Microsoft\VisualStudio\15.0_3eeca950\ExtensionManager\ExtensionAutoUpdateEnrollment
. Under it are listed all the extensions installed, each one as a DWORD value, where a 0
value means no automatic update, 1
means that it is automatically updated.
Each extension value is named after the ID of the extension, together the current version. For example WixToolset.VisualStudioExtension.Dev15,0.9.21.62588
.
You can check this ID in the manifest.json
file of the extension package (you can open the .vsix files using 7-Zip for example). If you don't have the .vsix file, can find the extension data under %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_3eeca950\Extensions\
.