none
Deploying / settings default user settings RRS feed

  • Question

  • Dear folks,


    we are trying to use an offline install to silently deploy Visual Studio 2019, and so far we have been able to get it to install and it works well.

    However, we are trying to deploy some default user settings (or system-wide settings), mainly:

    • Default environment (C++/C#...)

    • Disabling of all updates

    Executing

    "vsregedit.exe" set "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional" HKLM ExtensionManager AutomaticallyCheckForUpdates2Override dword 0

    disables only the per-user updates for the current user.

    We want to administratively disable all updates for all users, including new ones.

    The reference for controlling updates didn't help here.


    • Disabling of first start / sign in wizard

    Here, we have not found any information on how to disable this the first time.

    Any help is appreciated. Thanks!



    Wednesday, April 24, 2019 10:48 AM

Answers

  • The following steps are currently necessary for making VS behave the appropriate way:

    On setup, do machine config:

    {INSTALLPATH}\Common7\IDE\Extensions\MachineState.json

    {"Extensions":[],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}

    Win Registry: SOFTWARE\Policies\Microsoft\VisualStudio\SQM DWORD 0

    ================================

    On startup for each user (we do this by hijacking the VS2019 shortcuts to devenv.exe to a script)

    %LOCALAPPDATA%\Microsoft\VisualStudio\Packages\_Instances\{INSTANCEID}\state.json

    {"userProperties":{"lastSuccessfulCheckUTC":"04/25/2019 00:00:00","hasUpdate":"False","backgroundDownloadDisabled":"1","userOperationMode":"InstallWhileDownloading"}}


    Prepare these two files with any user, close VS, and copy to a source so that you can apply for user once (initial config) or always (for "reapply" behavior):

    ==================================

    %LOCALAPPDATA%\Microsoft\VisualStudio\{VERSION}_{INSTANCEID}\Settings\CurrentSettings.vssettings
    %LOCALAPPDATA%\Microsoft\VisualStudio\{VERSION}_{INSTANCEID}\privateregistry.bin

    Always vsregedit the following keys before starting devenv.exe

    HKCU ExtensionManager AutomaticallyCheckForUpdates2 dword 0
    HKCU ExtensionManager EnableAdminExtensions dword 0
    HKCU ExtensionManager AutomaticallyUpdateExtensions dword 0
    HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword 0
    HKCU ExtensionManager EnableAdminExtensionsOverride dword 0
    HKCU ExtensionManager AutomaticallyUpdateExtensionsOverride dword 0


    This wrestles VS2019 into behaving the way we want right now.

    Nobody seemed to have cared about administratability when making the setup :/




    Friday, April 26, 2019 3:16 PM

All replies

  • Hi friend,

    Sorry for the reply delays,

    I can reproduce this issue in my side. Indeed, the command line could disable one of update option. I checked most of the documentation for this feature, unfortunately, there is no more information here to show how to disable this feature at all.

    Therefore, I recommend you should submit this feature request: https://developercommunity.visualstudio.com/spaces/22/index.html The Visual Studio product team is listening to user voice there. You can send your idea there and people can vote, I hope you could post that link here, so other community members who are interested in this issue will help you vote it. If there have any updates from there, I will also update the information in here.

    The product team expert would think about adding it as a new feature in the future product. Thank you in advance for helping us build a better Visual Studio!

    How to report a VS problem or suggestion: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2019

    Sincerely

    May


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, April 25, 2019 9:24 AM
    Moderator
  • The following steps are currently necessary for making VS behave the appropriate way:

    On setup, do machine config:

    {INSTALLPATH}\Common7\IDE\Extensions\MachineState.json

    {"Extensions":[],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}

    Win Registry: SOFTWARE\Policies\Microsoft\VisualStudio\SQM DWORD 0

    ================================

    On startup for each user (we do this by hijacking the VS2019 shortcuts to devenv.exe to a script)

    %LOCALAPPDATA%\Microsoft\VisualStudio\Packages\_Instances\{INSTANCEID}\state.json

    {"userProperties":{"lastSuccessfulCheckUTC":"04/25/2019 00:00:00","hasUpdate":"False","backgroundDownloadDisabled":"1","userOperationMode":"InstallWhileDownloading"}}


    Prepare these two files with any user, close VS, and copy to a source so that you can apply for user once (initial config) or always (for "reapply" behavior):

    ==================================

    %LOCALAPPDATA%\Microsoft\VisualStudio\{VERSION}_{INSTANCEID}\Settings\CurrentSettings.vssettings
    %LOCALAPPDATA%\Microsoft\VisualStudio\{VERSION}_{INSTANCEID}\privateregistry.bin

    Always vsregedit the following keys before starting devenv.exe

    HKCU ExtensionManager AutomaticallyCheckForUpdates2 dword 0
    HKCU ExtensionManager EnableAdminExtensions dword 0
    HKCU ExtensionManager AutomaticallyUpdateExtensions dword 0
    HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword 0
    HKCU ExtensionManager EnableAdminExtensionsOverride dword 0
    HKCU ExtensionManager AutomaticallyUpdateExtensionsOverride dword 0


    This wrestles VS2019 into behaving the way we want right now.

    Nobody seemed to have cared about administratability when making the setup :/




    Friday, April 26, 2019 3:16 PM
  • Hi,

    How to get Instance ID?

    If I try with vswhere.exe I am not getting INSTANCE ID to disable product update

    Monday, July 6, 2020 7:24 AM
  • The following command line works for use to get parseable XML containing the instance IDs:

    vswhere.exe -nologo -version "16.0" -all -format xml

    where 16.0 is the Visual Studio version we're interested in.

    vswhere.exe version is 2.6.7+91f4c1d09e [query version 2.0.2250.60958]

    Example output:

    <instances>
      <instance>
        <instanceId>48d114ee</instanceId>
        <installDate>2019-04-24T11:06:15Z</installDate>
        <installationName>VisualStudio/16.0.2+28803.202</installationName>
        <installationPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional</installationPath>
        <installationVersion>16.0.28803.202</installationVersion>
        <productId>Microsoft.VisualStudio.Product.Professional</productId>
        <productPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe</productPath>
        <state>3</state>
        <isComplete>0</isComplete>
        <isLaunchable>0</isLaunchable>
        <isPrerelease>0</isPrerelease>
        <isRebootRequired>1</isRebootRequired>
        <displayName>Visual Studio Professional 2019</displayName>
        <description>Professional developer tools and services for small teams</description>
        <channelId>VisualStudio.16.Release</channelId>
        <channelUri>https://aka.ms/vs/16/release/channel</channelUri>
        <enginePath>C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service</enginePath>
        <installChannelUri>C:\vslayout\ChannelManifest.json</installChannelUri>
        <layoutPath>C:\vslayout</layoutPath>
        <releaseNotes>https://go.microsoft.com/fwlink/?LinkId=660893#16.0.2</releaseNotes>
        <thirdPartyNotices>https://go.microsoft.com/fwlink/?LinkId=660909</thirdPartyNotices>
        <updateDate>2019-04-24T11:06:15.1142657Z</updateDate>
        <catalog>
          <buildBranch>d16.0</buildBranch>
          <buildVersion>16.0.28803.202</buildVersion>
          <id>VisualStudio/16.0.2+28803.202</id>
          <localBuild>build-lab</localBuild>
          <manifestName>VisualStudio</manifestName>
          <manifestType>installer</manifestType>
          <productDisplayVersion>16.0.2</productDisplayVersion>
          <productLine>Dev16</productLine>
          <productLineVersion>2019</productLineVersion>
          <productMilestone>RTW</productMilestone>
          <productMilestoneIsPreRelease>False</productMilestoneIsPreRelease>
          <productName>Visual Studio</productName>
          <productPatchVersion>2</productPatchVersion>
          <productPreReleaseMilestoneSuffix>1.0</productPreReleaseMilestoneSuffix>
          <productSemanticVersion>16.0.2+28803.202</productSemanticVersion>
          <requiredEngineVersion>2.0.3297.47373</requiredEngineVersion>
        </catalog>
        <properties>
          <campaignId></campaignId>
          <channelManifestId>VisualStudio.16.Release/16.0.2+28803.202</channelManifestId>
          <nickname></nickname>
          <setupEngineFilePath>C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe</setupEngineFilePath>
        </properties>
      </instance>
    </instances>


    Monday, July 6, 2020 9:44 AM