Partilhar via


New simplified silent install switches are available for Visual Studio 2008 setup

Visual Studio 2002, 2003 and 2005 setups include a silent deployment mode that requires multiple steps (creating an INI file on the matching OS version and language, then running VS setup and passing it the INI file to perform the installation).  Those of you who have automated the installation of these versions of Visual Studio can attest to the difficulties that this multi-step, OS version-specific process has introduced.

In order to make the most commonly needed automated installation scenarios easier to achieve, the following command line switches have been added to Visual Studio 2008 setup:

  • setup.exe /q - this will perform a silent default installation of VS 2008. This is the equivalent of running VS 2008 setup using setup UI and selecting the Default install type radio button.
  • setup.exe /q /full - this will perform a silent full installation of VS 2008. This is the equivalent of running VS 2008 setup using setup UI and selecting the Full install type radio button.

Note - if you need to pass in a product key when running setup using these new silent switches, you will need to use the syntax described in this blog post.

There are some important notes to keep in mind for these new silent install options:

  • When using these command line switches, you must make sure that you pass them to the setup.exe in the Setup subdirectory, and not to the setup.exe at the root of the VS 2008 installation disc.  Only the setup.exe in the Setup subdirectory understands these command line parameters.
  • If you run setup.exe /q on a system that already has that edition of VS 2008 installed, it will invoke a silent repair instead of a silent installation.
  • If you need to perform a silent non-default installation of VS 2008 (as opposed to a default or a full installation), then your best bet will be to use the INI creation mode that has existed in previous versions of VS 2008.
  • It is also possible to gather a list of feature names that you want to install by running VS 2008 setup once in UI mode, selecting the features you want to install in the setup UI feature tree, then looking at the verbose MSI log file that is created during installation to figure out the exact list of feature names to pass in during silent installation.  However, that option is more complicated and error-prone than INI creation mode, so I don't recommend using this method unless absolutely necessary.
  • If you want to be able to control reboots, you can also pass in the /norestart switch.  This will prevent setup from forcing a reboot during installation if one of the components it is installing requests one.  It does not, however, postpone the reboot until the end of setup.  In some cases, the setup team determined that it is not safe to defer reboot requests for a component, and have set a flag in a setup data file to indicate that (specifically, the flag RebootLaterOk=0 in baseline.dat).  If one of these components returns 3010, and you pass in the /norestart switch, then setup will exit but will not reboot.  It is up to the process running the silent install to reboot the system and re-start setup after the reboot in order to allow setup to continue.
  • To avoid reboots, you can configure your systems with any prerequisite packages that tend to cause reboot requests prior to deploying VS 2008.  Doing this will cause VS 2008 setup to skip installing those prerequisites because setup will detect that they are already present on the system.

<update date="9/20/2007"> Added more details about how the /norestart switch works </update>

<update date="12/17/2008"> Added a link to a separate blog post I wrote about how to pass a product key into setup when using the /q switch. </update>

Comments

  • Anonymous
    September 12, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/09/13/new-simplified-silent-install-switches-are-available-for-visual-studio-2008-setup/

  • Anonymous
    November 02, 2007
    While helping an internal Microsoft team work on deployment scripts to install Visual Studio 2008 to

  • Anonymous
    November 02, 2007
    While helping an internal Microsoft team work on deployment scripts to install Visual Studio 2008 to

  • Anonymous
    November 02, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/11/02/how-to-work-around-visual-studio-2008-unattended-install-bug-related-to-windows-installer-31/

  • Anonymous
    November 09, 2007
    I previously wrote a blog post describing some new silent install switches that have been introduced

  • Anonymous
    November 09, 2007
    I previously wrote a blog post describing some new silent install switches that have been introduced

  • Anonymous
    April 25, 2008
    Recently, I posted some instructions for creating an installable layout for Visual Studio 2008 Express

  • Anonymous
    April 30, 2008
    When I do a silent install of Visual Studio 2008 Development Edition using the switch:Setupsetup.exe /q /norestart /unattendfile \serversetupVS.iniThe reboot occurs at the end of the installation. When I restart Visual Studio 2008 works fine but I really need to suppress that final reboot or at least prompt the user to reboot.I am running this script to install the prerequisites:WCUmsi31WindowsInstaller-KB893803-v2-x86.exe /quiet /norestartWCUdotNetFrameworkdotnetfx35setup.exe /q /norestart /lang:ENUWCUDExploredexplore.exe /qWCUWebDesignerCoreWebDesignerCore.exe /Q /installSetupsetup.exe /q /norestart /unattendfile \iaunswd03dp$SMSPKGD000003bsetupVS.iniWill that be enough to suppress the reboot or am I missing something?Regards Alex

  • Anonymous
    April 30, 2008
    The comment has been removed

  • Anonymous
    May 16, 2008
    I am using the setup.exe /q /full command to push VS 2008 to a couple test machines.  It works great when I run the command under a logged on user, but when I send it via the remote deployment software we use, I receive the following error in the Application log on the target machine.Event Type: ErrorEvent Source: MsiInstallerEvent Category: NoneEvent ID: 10005Description:Product: RGB9RAST -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2103. The arguments are: 26, ,I looked this error up and it seems .net Framework 3.5 has to install under a user with a local profile (which my deployment account won't have on the target machine)I tried creating a separate task to just install framework 3.5 and to pass the ALLUSERS option to the installer.  But I still receive the same error.  The command I tried wasdotNetFrameworkdotnetfx35setup.exe /q /norestart /lang:ENU /v"ALLUSERS=2"Does anyone have a workaround for this issue?Just to clarify, the full silent install works great if it is run under a logged on user.  When run under a deployment account (an account with no local profile) .net framework 3.5 fails.

  • Anonymous
    May 21, 2008
    The comment has been removed

  • Anonymous
    May 27, 2008
    Thank you for the reply Aaron.  I've got my silent install working.  One more question. Is there a way to chain the MSDN install to the end of the V.S. 2008 install?Right now, my 2008 silent install reboots the machine, then I have another task I have to send to install the MSDN documentation.It would be great if it would all install at once, then reboot the machine at the end.

  • Anonymous
    May 27, 2008
    Hi Ac2008 - VS 2008 setup has a /norestart switch that you should be able to use to suppress the reboot at the end of VS 2008 installation.  When you do that, you should be able to schedule the MSDN installation and then defer the reboot until after that completes.There is also a way to chain MSDN install directly to the end of VS installation, but it cannot be done with the new /q, /full or /norestart switches.  Instead, you need to use the old unattended INI file installation mechanism.  There is an example of how to do this and chain MSDN for VS 2005 at http://blogs.msdn.com/astebner/archive/2005/05/24/421314.aspx.  I haven't tried those steps with VS 2008, but the underlying setup is similar enough in VS 2008 that I think these steps should also work in VS 2008.

  • Anonymous
    July 29, 2008
    Are there any uninstall switches? What is the best (and quickest) way to implement a silent uninstall of visual studio 2008 (default install)

  • Anonymous
    July 31, 2008
    The comment has been removed

  • Anonymous
    December 01, 2008
    "setup /q" is too silent ...Is there a way to show the Visual Studio 2008 Setup Screen (to show the progess of the installation) during the unattended setup?Just as msiexec's /qb- or /passive?

  • Anonymous
    December 01, 2008
    The comment has been removed

  • Anonymous
    December 01, 2008
    Thanks Aaron,this is really a feature that should be implemented in future versions ...

  • Anonymous
    December 02, 2008
    Hi Seiba - I haven't heard of much demand for this type of feature for a development tools product like Visual Studio.  Typically, this type of unattended mode is needed for redistributables like the .NET Framework, but it is much less important for developer tools like VS.As I said in my previous reply, if this scenario is important to you, I encourage you to post it as a feature suggestion on the Connect site and explain why this type of unattended mode is needed for your scenario.  The site for reporting Visual Studio bugs and feature suggestions is located at http://connect.microsoft.com/visualstudio/.

  • Anonymous
    December 17, 2008
    i am able to install the setup using the command setupsetup.exe /q /norestartbut i have to apply few setting like provide the Product key and move the shortcuts under StartMenuProgramsVisualStudio2008 to StartmenuProgramsABCVisualStudio 2008,how to i apply these settings.Also i am unable to create the ini file by using /CreateUnattend switch.

  • Anonymous
    December 17, 2008
    The comment has been removed

  • Anonymous
    January 07, 2009
    Hello Aaron, I wasn't sure if I should post this here or in one of your other articles (particularly http://blogs.msdn.com/astebner/archive/2006/01/20/515629.aspx), but since my problem involves VS 2008, I thought here would be better.I am a sys admin and I have been tasked with getting VS 2008 installed, preferably silently, on a number of systems (~35), all currently running VS 2005.  After running the setupsetup.exe file in adminstrator mode and creating the necessary .ini file (all done on my machine which DOES NOT run VS 2005), I have managed to automate the process with a batch file that points to the same install directory (which houses these files).  With this batch file, I was able to successfully (and silently) install VS 2008 on my machine, which again, DID NOT have VS 2005 also installed.  I did, however, have to edit the .ini file in a similar manner to your instructions outlined in the article noted above.The problem I am now facing is that when I attempt to run the same batch file (aka same setup.exe and .ini files) on one of the systems currently running VS 2005, the install fails/stops fairly quickly and/or instead does nothing.  Could this behavior be in any way  caused by VS 2005 also being installed?  Are additional .ini file tweaks needed?As an FYI and as you probably already know, my devs tell me running VS 2005 and 2008 side-by-side is ok.  In a few months time and after the dust settles, they plan on having 2005 uninstalled.Your time and assistance is greatly appreciated.  Thank you!

  • Anonymous
    January 07, 2009
    The comment has been removed

  • Anonymous
    January 18, 2009
    PingBack from http://www.keyongtech.com/1188837-how-to-build-a-setup

  • Anonymous
    May 12, 2015
    I finally figure out how to do full install of Visual Studio 2008 silently on Windows 2012 R2. I could never get the unattend.ini file to work and probably due to prerequisites. SQL 2005 Server is not support on Windows 2012 R2 so I had to a registry key/value to ignore it. I wrote a Chef recipe to encompass this for the automation which I will post shortly to GitHub. :)

  • Anonymous
    December 05, 2016

  1. To create custom installation Use, \Setup\Setup.exe /createunattendfile C:\temp\VSconfig.ini 2) Run : \setup\setup.exe /unattendfile C:\temp\VSconfig.ini