none
VS 2017 unattended install

    Question

  • Dear Experts!

    I'd like to deploy VS2107 via SCCM. Previously I created the answer file with the vs_enterprise /createadminfile switch for this. It seems that this method does not work anymore. What is the recommended way to install in unattended mode?

    TIA,
    G

    Friday, February 17, 2017 8:54 AM

All replies

  • Hi,

    Welcome to MSDN forum.

    To deploy Visual Studio in unattended mode, you must modify the AdminDeployment.xml file. To do this, you must first create the AdminDeployment.xml file by using the /CreateAdminFile <file location> command-line parameter. Then, you can use this file to either push a deployment of Visual Studio to your network or pull it into an installation if you put that file in the Drive:\IDEinstall\packages directory. The AdminDeployment.xml file is not unique to an operating system, architecture, edition of Visual Studio, or operating-system language.

    Now, there is no the latest documentation of creating and running an unattended installation of visual studio for visual studio 2017, you could refer to the documentation for visual studio 2015: 

    https://msdn.microsoft.com/en-us/library/ee225237.aspx?f=255&MSPPError=-2147217396

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Saturday, February 18, 2017 7:11 AM
  • Hi Joyce,

    FYI /CreateAdminFile does not work for VS2017.

    Br,
    G

    Saturday, February 18, 2017 11:05 AM
  • Hi,

    Thank you for your update.

    Visual studio 2017 RC, RC means release candidate and the edition of RTM of visual studio 2017 will be released in March. at the time, the relevant documents about visual studio 2017 will also released.  Thank you for understanding.

    Best regards,

    Joyce 


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 20, 2017 4:53 AM
  • Hello Joyce (and everyone else),

    Joyce, you appear to have missed the point of the original question, and the subsequent comments.

    The /CreateAdminFile switch is no longer a valid solution for Visual Studio 2017, RC, RTM, or otherwise, as the installer has changed to a totally different format.

    I (and others) require documentation on the equivalent for Visual Studio 2017.

    I can see that the some of the documentation refers to installing from an offline folder, but the name of the executable in the documentation is wrong, also, it indicates that we must provide a 'productid' at the command line for installation, that this is required, but I am unable to locate anywhere what this product id should be.

    Working on the assumption that I have an offline folder already prepared, can you please put me in contact with someone who can help me prepare a command line, passive install, for a predefined selection of modules/workloads for Visual Studio 2017, which I will then need to replicate for each edition.

    Many thanks in advance.

    Antony


    • Edited by Antony Gibbs Wednesday, March 8, 2017 8:57 AM Typos
    Wednesday, March 8, 2017 8:56 AM
  • Hi Antony,

    you're right, the documentation on an unattended installation of Visual Studio 2017 is still confusing. I managed to run an unattended installation by using the following command line.

    If you want to create an offline setup, first run:

    .\vs_enterprise.exe --layout c:\temp --add Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.NetWeb Microsoft.VisualStudio.Workload.Node Microsoft.VisualStudio.Workload.Office Microsoft.VisualStudio.Component.TypeScript.2.0 Microsoft.VisualStudio.Component.TestTools.WebLoadTest Component.GitHub.VisualStudio

    If you're okay with an online setup, skip the above and continue with the installation of Visual Studio 2017:

    Get-ChildItem -Path .\certificates -Filter *.p12 | Import-PfxCertificate -CertStoreLocation cert:\localMachine\my

    .\vs_enterprise.exe --passive --norestart --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetCoreTools --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Node --add Microsoft.VisualStudio.Workload.Office --add Microsoft.VisualStudio.Component.TypeScript.2.0 --add Microsoft.VisualStudio.Component.TestTools.WebLoadTest --add Component.GitHub.VisualStudio

    Few things to note:

    • There is no answer file anymore
    • --productid is not required but would otherwise be Microsoft.VisualStudio.Product.Enterprise when using the Enterprise edition. Open Response.json in your offline installer files folder and look for productid for the proper string if you're using a different version.
    • If I specify a language using --lang, it doesn't work. If you don't specify a language, it will take en-US by default
    • Note that each component and/or workload you add MUST be preceded with --add again when doing the installation of Visual Studio 2017. However if you're creating an offline copy of the file, you only specify --add once and separate each component or workload with just a space. Inconsistency to the max!
    • You can replace --passive with --quiet if you don't want any UI to show. --passive will show the UI but won't require any user interaction at all during the installation process
    • The executable file is likely named slightly different with a version number in the filename. This is also fine. I just renamed my .exe to vs_enterprise.exe for easier readability.
    • If you run the command line for the unattended setup and see for a short moment the white screen after which it disappears and no installer follows, it means something in your arguments is wrong. Check it again for typos and the above hints.
    • You MUST import the PFX certificates found under the \certificates folder of the offline install folder before you try the unattended installation or it will fail. The above PowerShell provides an easy means of importing the three .p12 certificates from that folder.
    • As Temesvari points out below, good addition, for a complete overview of the workloads and components you can install, see https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise
    • Once you have Visual Studio 2017 installed (check Add/Remove programs in Config Panel if you're not sure), it will not allow you to add offline components to the existing installation anymore. When I used the above line again when Visual Studio 2017 was already on my machine, just to add additional components, it kept insisting to download the bits instead of using them from the offline copy

    Hope this helps you get your unattended setup of Visual Studio 2017 to work.


    All information provided by me in the forums are based on my own opinion and does not necessarily reflect the opinion or view of Microsoft or its employees. No rights can be claimed from information provided by me nor can I or Microsoft be held responsible for actions forthcoming out of the provided information.





    • Proposed as answer by Koen Zomers Friday, March 10, 2017 12:54 PM
    • Edited by Koen Zomers Monday, March 13, 2017 10:17 PM Added info on creating an offline installer
    Wednesday, March 8, 2017 10:33 PM
  • Hi Koen,

    I am trying to do a quiet uninstallation of VS 2017 but there seems to be a bug because in the end I get a message box saying that the Uninstallation was successfully.

    Do you get the same or do you use another command line?

    I am using vs_installer.exe /uninstall --q.

    -Fredrik

    Friday, March 10, 2017 3:36 PM
  • Hi Frederik,

    I also couldn't get an unattended uninstall to work. With --q or --quiet it simply seems to do nothing. With --passive it just shows the ui in attended mode. I guess these two switches were only implemented for an installation, not an uninstall.


    All information provided by me in the forums are based on my own opinion and does not necessarily reflect the opinion or view of Microsoft or its employees. No rights can be claimed from information provided by me nor can I or Microsoft be held responsible for actions forthcoming out of the provided information.

    Monday, March 13, 2017 9:58 PM
  • Hi Joyce,

    I am sorry to tell you that you do not respond to any of the questions asked above.. Please read the questions first and answer once you've found out how to solve the issue (of course if you found anything that can be conclusive).

    Thanks for your understanding.

    Greetings, Andy McRae

    Monday, March 27, 2017 12:40 PM
  • Hi All,

    If you have any other new questions about VS installation, you could post a new thread to express more detailed information about your personal issue, we will try to help you analyze and troubleshoot.

    Thank you for your understanding and cooperation.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 28, 2017 9:06 AM
    Moderator
  • Is it any way to install studio from UI and than get a list of all components which were installed to repeat this in unattended way?

    This is f.. creasy to think that someone will use https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise - this one to prepare this file.

    Sunday, June 3, 2018 2:34 AM
  • Is it any way to install studio from UI and than get a list of all components which were installed to repeat this in unattended way?

    This is f.. creasy to think that someone will use https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise - this one to prepare this file.

    I agree, i wanted to create a specifc set of components and even then it wasn't obvious what workload was required., so in the end i have a full 32GB install package (eek) or a package that lets the end user select the components they want.

    Friday, June 29, 2018 10:14 AM