Offline installation of VS2017 in 4 Easy Steps
You are probably aware by now that Visual Studio 2017 has been released. The
latest version of Visual Studio comes in three editions - Community,
Professional and Enterprise. You can download them
here.
By default the installation of Visual Studio 2017 is taken care by a web
installer. That means you download only the required components over the web.
Although this works quite well in many cases, at times you may want to install
Visual Studio 2017 in offline manner. Some of the possibilities include unstable
internet connection and installation on large number of machines of your
organization. As of this writing there is no ISO image of the product that one
can download. Luckily, there is a command line way to grab all the installation
components that you need for an offline installation. So, let's see how to grab
them in four easy steps.
1. Download the Visual Studio 2017 installer
When you visit the Visual Studio
download page, you
find the three editions that you can download.

Select depending on your choice. For example, if you have MSDN subscription
you can go for Enterprise edition of the product. If you want a FREE edition
then you can go for Community edition and so on. Once you pick the edition you
are prompted to download the installer. The following figure shows this dialog
for the Professional edition of the product.

As you can see this is a tiny installation file (1 MB) and you can
store it in some folder of your machine. Make sure not to double-click or run
this file directly, otherwise the web installer will start.
2. Create a folder where you want the offline files to be stored
Next, create a new folder somewhere on your machine. This is the folder where
you will download and store all the files necessary for the offline
installation. As an example. I created Setup folder under the folder where I
downloaded the installer discussed in Step 1.

3. Download all the components required for offline installation using a
command line
Now comes the important step. Fire up the command prompt and navigate
to the folder where you downloaded the installed in Step 1. Then issue the
following command :
vs_professional.exe
--layout C:\VS2017\Setup
--lang en-US
Basically you are running the downloaded installer in command line mode. The
--layout switch specifies the folder where the offline installation files should
be stored. Make sure to change this path as per your folder structure. The --lang
switch indicates the language packs to be downloaded. Here I specify en-US.
The above command will download EVERYTHING required for the installation.
Obviously, the download is going to take time depending on your internet speed.
The download file size may also very depending on the edition and additional
switches you might use. After
issuing the above command a console is opened that shows what's going on.

Ensure that you have enough disk space because this command will download
good amount of bytes onto your machine. So, just check the free space before
running this command. Alternatively, add only those workloads that you really
need. For example, for web development workload specify --add
Microsoft.VisualStudio.Workload.NetWeb to the command line. See documentation
for a list of workload IDs.
Note that this is just the basic syntax of the command line usage.
There are many more switches and options available. Go
here for more details.
4. Run the setup from the downloaded files
Now that you have downloaded all the required files (see the following figure
to get a glimpse of the download), run the setup file and
follow the installation instructions.

That's it for now! Keep coding!!