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:
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’:
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.
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:
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:
4. Deployment Types screen: Click on the ‘Add’ button to start the ‘Create Deployment Type Wizard’:
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’:
6. General Information Screen: Give the deployment type a name and fill in the rest of the fields as you wish.
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
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.
9. Detection Rule page: Fill in the fields as per the screenshot below then click OK:
10. The results of your detection rule:
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.
12. Requirements screen: Click on the Add button to add some system requirements for this application.
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.
14. The results of your requirements:
15. Dependencies screen: Leave this screen blank and click the Next button:
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.
17. Ensure that the Create Deployment Type Wizard completed successfully then click the Close button:
18. Deployment Types screen: You should now have your dotNet deployment type listed. Click the Next button.
19. Summary screen. Give it a once over and click Next if you’re happy and you know it.
20. The Completion screen: You should have a successful message. If you have, click the Close button and we’re done.
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)
2. Specify Information about this application screen: Give the application a meaningful name and complete the rest of the fields as you see fit:
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.
4. Deployment Types screen: Click the Add button in order to add a new deployment type.
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;
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.
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):
8. Detection Method screen: Click the ‘Add Clause’ button:
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:
10. The results of your detection rule:
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.
12. Requirements screen: Click the ‘Add’ button.
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.
14. Dependencies screen: Click the ‘Add’ button.
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.
16. Your dependency screen should now look a bit like this:
17. Summary screen: Take a final look then click Next if you’re happy.
18. Completion screen: If your successful, click the Close button.
19. Deployment Types screen: You should now have an entry on this screen. Click the Next button to continue.
20. Summary screen: Click the next button.
21. Completion Screen: Click Close.
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.