• Welcome to Support Forum: Get Support for Patch My PC Products and Services.
 

Microsoft Visual Studio Code - Internal updater vs PMPC Auto updates?

Started by trevorbuley, August 13, 2023, 07:13:58 PM

Previous topic - Next topic

trevorbuley

Hi All,
Am having some issues with the internal updater in VSCode being 'on' by default when the app is pushed out via PMPC.
VSCode will initially deploy just fine, but the internal updater will attempt to update as soon as there is a new version and breaks the install.

Any chance we could get the internal updates setting turned off by default for VSCode deploys?

Pete (Patch My PC)

Quote from: trevorbuley on August 13, 2023, 07:13:58 PMAm having some issues with the internal updater in VSCode being 'on' by default when the app is pushed out via PMPC.
VSCode will initially deploy just fine, but the internal updater will attempt to update as soon as there is a new version and breaks the install.

Hi Trevor,

When you mention it attempts to update and breaks the install could you please elaborate on that?

JoeH

For what it's worth, I have a PowerShell script that runs via Post Script in PMPC which disables the built-in autoupdater.

ForEach ($user in (Get-ChildItem -Path "C:\Users")) {
    $jsonPath = "C:\Users\" + $user.Name + "\AppData\Roaming\Code\User\settings.json"
    If (Test-Path "$jsonPath") {
        $json = Get-Content "$jsonPath" -Raw | ConvertFrom-Json
        $json | Add-Member -Force -MemberType NoteProperty -Name "update.mode" -Value "none"
        $json | ConvertTo-Json | Out-File "$jsonPath" -Encoding utf8
    }
}

trevorbuley

QuoteHi Trevor,
When you mention it attempts to update and breaks the install could you please elaborate on that?
Its the built in update (or part of) thats getting block by our WDAC rules (or device guard).  The internal updater is only able to partially update and thus bricks the install.

Quote from: JoeH on August 16, 2023, 06:17:35 AMFor what it's worth, I have a PowerShell script that runs via Post Script in PMPC which disables the built-in autoupdater.
Awesome!  Thanks JoeH, I'll give that a try!

Hugo Marinho (Patch My PC)

Hi Trevor,

PMPC has a built-in feature to "Disable self-updater" for installers that support it, it seems that however VSCode does not support this feature, so the workaround here would be to use a custom script to do this for you after the installation/update is complete, to do so you can right-click the app/update of VSCode, enable the option "Add custom pre/post scripts" and from there select the script that will disable the self-updater for for you.

Hope to have helped!