Get in Touch
Back to main blog page
blog img

Suppressing auto-update checks for Microsoft Visual Studio Code for Mac

Released back in March 2016, Visual Studio is Microsoft’s own offering for Code editing, for Windows, Mac and Linux. In this blog post, we’ll explain how we went about managing Microsoft Visual Studio Code for Mac.

Recently we were asked to package and deploy this piece of software for a UK university. Managing Microsoft Visual Studio Code for Mac turns out to be a bit of a pain.  Especially working out how to include a number of custom extensions (once myself or one of my colleagues gets our notes square, we’ll try and share our methods).

One of the extra tasks, as you’d expect in many locations, is the ability to control and manage the release of updates to client devices. As part of this, we were required to suppress the automatic checking for updates, for two key reasons:

  • It allows us to both control the ‘current’ level of patching for the application, as well as proceed with a phased ‘dev’ -> ‘testing’ -> ‘live’ rollout strategy.
  • It should reduce the pop up messages disabled to users as they launch the run the application.

After a lot of digging I found the information I required, here.

Oh, it’s a JSON file. In the User’s home area. And in a nested directory within Application Support. That’s gonna rule out using profiles. sigh

It’s Scriptin’ Time

Ok, on another blog I wrote about dumping a web shortcut file (a web-lock file) on the currently logged in user’s desktop. I’ve taken the majority of that script, and turned it into this one.

So what’s it doing eh?

  • Line 23: The name of the file we need
  • Line 30: The path to the directory the file sits in
  • Lines 38-47: Checks if the logged in user is either ‘root’ or blank, and bails
  • Lines 52-69: Check for the parent directories and create them if required
  • Line 61-69: Create the file with the required contents and permission it as expected.

Gotcha’s

Some gotcha’s about this script in it’s current usage:

  • If a user already has launched Visual Studio, they’d almost certainly already have a populated settings file, and…well…this script will wipe it clean, before applying what we want, so I’d suggest having this script run at login, once per user.
  • Managing Microsoft Visual Studio Code for Mac requires that you write to a text file. It is possible for the user to undo these changes. If you wish to be able to manage this setting in an Apple supported manner, perhaps with the use of a configuration profile (much like the Office for Mac suite), I’d suggest getting in touch with the developers, perhaps via the Community Pages
  • If the script detects the root user account, or no user account, it will exit without doing any work. These two scenarios tend to mean the device is sitting at the login window, or some other strangeness that would stop the script completing fine anyway.
  • I’ve only tested this scripted solution on 10.12.x and 10.13.x.

How do I use the script?

I’d suggest using this as a Jamf Pro login policy, or using one of the outsetlogin” triggers.

The disclaimer:

While the author has taken care to provide the readers with accurate information, please use discretion before acting upon information based on the content of this blog post. moof IT will not compensate in any way whatsoever if the reader suffers loss/inconvenience/damage because of/while making use of information in this blog.


Leave a Reply

Other Articles

16-inch MacBook Pro
How does the new 16-inch MacBook Pro compare with its predecessor?
13th November 2019

Some of you may be wondering what you get with the new 16-inch MacBook Pro,…

blog image
Are they holding my passwords securely?
10th July 2018

You will probably have seen in the news recently that a number of well known…

What is credential stuffing and why should you care?
25th November 2019

Credential stuffing, is a simple but effective technique to take over more of your online…

blog img
Suppressing auto-update checks for Microsoft Visual Studio Code for Mac
15th January 2018

Released back in March 2016, Visual Studio is Microsoft’s own offering for Code editing, for…

outlook_spotlight
How to fix issues with Outlook search in macOS
14th January 2020

From time to time, you search for emails in Outlook and it doesn’t display the…

About moof IT

moof IT are an Apple focused IT company providing a full range of services to over 150 clients including user support, device management, infrastructure and security.

Contact Info

Tel: 0203 983 4444

Email: hello@moof-it.co.uk

London: 1st Floor 20 Noel Street London W1F 8GW

Manchester: The Sharp Project, Thorp Rd, Manchester M40 5BJ

Surrey: Unit 9B, Southbridge House, Southbridge Place, Croydon CR0 4HA

Social Media