How to deploy Visual Studio 2012 using Configuration Manager 2012 and the Application method.

** UPDATE **  29 August 2014 – See this post for deploying Visual Studio 2013 and CU 3

Deploying Visual Studio 2012 and making it available or required  to either the Software Catalog or the Software Center is very easy to accomplish.  I am going to make the assumption that you wish to install the full version of Visual Studio 2012.  If you don’t, then you will need to edit the AdminDeployment.xml file that we will refer to in this guide a bit later.

There are two websites I used for reference whilst creating this deployment:

For the .net 4.5 deployment

For the Visual Studio 2012 deployment

If you are ready, copy the contents of your Visual Studio DVD to the relevant location on your Configuration Manager 2012 server where you would normally store your content for deployed applications and let’s get cracking.  (I also chose to store my .net 4.5 redistributable in a completely separate folder structure to the one that’s part of the VS2012 structure)

Some facts about this step-by-step guide before we start:

We will be creating two applications:

1.  .Net 4.5

2. Visual Studio 2012

And then make the .net 4.5 application a dependency of the Visual Studio 2012.

We will also be suppressing ALL reboots.   And here’s the thing: by suppressing the reboot you may find that your installation is in two parts ie it will install .net 4.5, then wait for a reboot (as we’ve suppressed it) before continuing with the Visual Studio 2012 application.  I prefer to suppress the reboots as it is less disruptive to the end-user if they have chosen to install it themselves from the Application Catalog.

Create Application 1: .Net 4.5

– Open the Configuration Manager console, select the ‘Software Library’ found at the bottom left of the console and then right-click the Applications’ node and select ‘Create Application’ in order to start the ‘Create Application Wizard’:

0

 

1.  Specify Settings for this application: As we are not using a .msi for this deployment, ensure that you select, “Manually specify the application information’ then click next.

1

2.  On the ‘General’ page:  Give your application a name.  In this instance I called mine, ‘dotNet4.5 Redistributable’ but you can call yours whatever you like.  Fill in the rest of the fields as you see fit:

2

 

3.  Application Catalog’ page:  Fill in the fields as you see fit.  As I will not be making this available to end-users via the software catalog I did not bother with most of these fields:

3

 

4.  Deployment Types screen:  Click on the ‘Add’ button to start the ‘Create Deployment Type Wizard’:

4

 

5.  Create Deployment Type Wizard\General screen:  Change the ‘Type’ field to: ‘Script Installer (Native)’ and ensure that the radio button is selected for ‘Manually specify the deployment information’:

5

 

6.  General Information Screen:  Give the deployment type a name and fill in the rest of the fields as you wish.

6

7.  Content screen:  In the ‘Content Location’ field, browse to the location of your Visual Studio 2012 source directory that you placed on your Configuration Manager 2012 server earlier.  For the installation program, type the name of the .net4.5 executable and add the paramaters for a silent installation and reboot suppress: “dotNetFx45_Full_setup.exe” /q /norestart  Then add the details for the ‘Uninstall Program’ field so that you can easily uninstall this program in the future should the need arise: “dotNetFx45_Full_setup.exe” /q /uninstall

7

 

8.  Detection Method screen:  Click on the ‘Add Clause’ button so that we can add a rule that config manager will use to detect if this program is already installed.

8

9.   Detection Rule page:  Fill in the fields as per the screenshot below then click OK:

net45detectionrule

 

10.   The results of your detection rule:

10

 

11.  User Experience screen:  Change the installation behavior to ‘Install for system’ and the logon requirement to: ‘Whether or not a user is logged on’   Complete the rest of the fields as you see fit then click next.

11

 

12.  Requirements screen:  Click on the Add button to add some system requirements for this application.

12

 

13.  Create Requirement dialog:  I chose to enable this installation only for computers that are running Windows 7 SP1 x86 or x64.  Complete this screen to include any other requirements you want to ensure that each computer meets before being allowed to install this program.

13

 

14.  The results of your requirements:

14

 

15.  Dependencies screen:   Leave this screen blank and click the Next button:

15

 

16.  Take a look at the Summary screen.  Review the settings and go back and edit them if necessary.  If you’re good to go then click on the Next button.

16

 

17.  Ensure that the Create Deployment Type Wizard completed successfully then click the Close button:

17

 

18.  Deployment Types screen:  You should now have your dotNet deployment type listed.  Click the Next button.

18

 

19.  Summary screen.  Give it a once over and click Next if you’re happy and you know it.

19

 

20.  The Completion screen:  You should have a successful message.  If you have, click the Close button and we’re done.

20

OK.  So that’s the first application created (Phew!)  We now have to create our main Visual Studio 2012 application.

 

Create Application 2: Visual Studio 2012

– We’ll start by opening the Configuration Manager console, select the ‘Software Library’ found at the bottom left of the console and then right-click the Applications’ node and select ‘Create Application’ in order to start the ‘Create Application Wizard’:  (Just like we did at the start of the .net 4.5 application we created)

1.  General screen:  Ensure that ‘Manually specify the application information’ is selected and that the type is ‘Windows Installer (Native)

1

 

2.   Specify Information about this application screen:  Give the application a meaningful name and complete the rest of the fields as you see fit:

2

 

3.  For the Application Catalog properties, I chose to fully populate all of the details and also to select an icon as should you decide to make this available to users via the application catalog then the more information you can provide here then the merrier.

3

4.  Deployment Types screen:  Click the Add button in order to add a new deployment type.

4

 

5.  Create Deployment Type wizard\General screen:  Ensure that the type is set to ‘Script Installer (Native)’ and that the radio button is on ‘Manually specify the deployment type information;

5

6.  General Information screen:  Give the deployment type a meaningful name and fill in the rest of the fields should you wish to then click next.

6

 

7.    Content screen:  Browse to the location of your Visual Studio 2012 source files on your Configuration manager 2012 server then in the Installation program field, click the browse button and browse to your Visual Studio executable file (it may be named differently to mine depending on the version you have) and add the following paramaters: /AdminFile AdminDeployment.xml /q /norestart  Then complete the Uninstall Program field so that we can uninstall this application in the future should we need to (See screenshot below for details):

7

 

8.  Detection Method screen:  Click the ‘Add Clause’ button:

8

 

9.  Detection Rule:  Originally, this post showed a detection rule using the registry key of HKLM\Software\Microsoft\VisualStudio\11.0 however I noticed a few installation failures due to not being able to detect the presence of the application.  It turned out that some computers had Microsoft Visual Studio 2012 Express installed which creates this key too. (And there may be other software that does the same) so I chose to detect the Visual Studio 2012 executable for my rule instead, as a unique registry one was hard to come by.  With that ramble out of the way,  check out the screenshot below for the settings that I used:

VisualStudio2012DetectionRule

 

10.  The results of your detection rule:

DetectionResults

 

11.  User Experience screen:  Change the Installation behaviour to ‘Install for system’ and the Logon Requirement to “Whether or not a user is logged on”  Complete the rest of the fields as you wish.

11

 

12.  Requirements screen:  Click the ‘Add’ button.

12

 

13.  Create Requirement screen:  I chose to make Windows 7 SP1 x86 and x64 a requirement for this application.  Your needs may differ to mine here and you can go into more depth such as free disk space, RAM etc etc.

13

 

14.  Dependencies screen:  Click the ‘Add’ button.

14

 

15.  Add Dependency dialog:  We need to ensure that .net4.5 will install (if not already installed) before Visual Studio 2012 is installed.  Create a new dependency by Clicking the Add button, give the dependency group a name and browse to your .net 4.5 application we created earlier in this guide.  Ensure that the ‘Auto Install’ box has a tick (check) in it.  Then click the OK button.

15

16.  Your dependency screen should now look a bit like this:

16

 

17.  Summary screen:  Take a final look then click Next if you’re happy.

17

 

18.  Completion screen:  If your successful, click the Close button.

18

 

19.  Deployment Types screen:  You should now have an entry on this screen.  Click the Next button to continue.

19

 

20.  Summary screen:  Click the next button.

20

 

21.  Completion Screen:  Click Close.

21

Nearly done now. We now need to edit the AdminDeployment.xml file in order to prevent it from downloading components from the web. I took the following information from here: http://msdn.microsoft.com/en-us/library/ee225237.aspx

Find AdminDeployment.xml file which should be in the root of your installation source directory on your Config Manger server and change the value of the NoWeb attribute of the BundleCustomizations element from “default” to “yes” as the following example shows:

Change <BundleCustomizations TargetDir=”default” NoWeb=”default”/> to  <BundleCustomizations TargetDir=”default” NoWeb=”yes”/>

Finished!  Upload your two applications to your distribution point and deploy to either computer or user group.

NB..Actually, you may think you have finished but if you’ve made it this far you may wish to deploy Visual Studio 2012 Update 2 now.  Sheesh…this just never ends eh?  Luckily I have a post on how to do this.

 

 

10 Comments

  1. This is a awesome write up. Very helpful. I followed your instructions, and it installed .net 4.5, and the test computer i pushed it to is trying to install VS 2012, and even shows it in the sccm and software centre saying it installing, but it never actually installs it. keeps asking to reboot, and i reboot, and it does the same.

    I am still new at this, and wonder where i can check logs to see what is stopping it from finishing the install?

    • Hi Kevin,

      Here’s the Microsoft link which will show you all of the log files, their locations and purpose: http://technet.microsoft.com/en-us/library/hh427342.aspx

      I have tried my guide out step-by-step again and it works for me – I know this doesn’t help you out though. Are you sure you haven’t missed a step?

      Also, what happens if you separate the .net deployment from the VS2012 deployment (ie no dependency) and try installing VS2012 by itself through a new deployment (you’ll need to make sure .net is installed first)

  2. This is an excellent article! I am new to SCCM, and have 2 questions on this: (1) Do you have the same guide for Visual Studio 2008 Pro? (2) Do I need to create deployments for both dotNet 4.5 redistributable and Visual Studio 2012 applications, or one can trigger the other? Can I assign both to the same device collection?

  3. Actually the VS 2012 install failed with this error “The software change returned error code 0x87D00324 (-2016410844)”. I looked in the C:\Windows\CCM\Logs\AppEnforce.log and it is showing

    I used “%programfiles%\Microsoft Visual Studio 11.0\Common7\IDE” “devenv.exe” (file system) detection that you specified.

    Can you please give me a hand?

    • Hi, I have changed workplace and so do not have SCCM to refer to at the moment although funnily enough I am literally starting to install it this week, although it won’t be finished until after Christmas break now.

      Anyway, firstly check that the path is correct and you have not made any typo’s, secondly, instead of using the detection method of just the executable, if you right-click the exe and select properties you will see the version number of the exe. Try detecting that instead. Sorry I can’t be much more help but I literally haven’t touched sccm for about a year 🙁

  4. Hi
    Thanks for the guide!
    I have VS 2015 update 1, is the 2015 version ok to follow this guide or is there big differences?

    Please let me know as I need to deploy it out and never done this before

  5. Hi ozthe2
    Our PCs have dot net 4.5.2 installed as part of the OSD task sequence. Is it safe to assume we don’t need to re-install dot before we install Visual Studio?
    Thanks in advance

Leave a Reply

Your email address will not be published.


*