Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

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

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

  • Comments 25

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>


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

  • While helping an internal Microsoft team work on deployment scripts to install Visual Studio 2008 to

  • While helping an internal Microsoft team work on deployment scripts to install Visual Studio 2008 to

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

  • I previously wrote a blog post describing some new silent install switches that have been introduced

  • I previously wrote a blog post describing some new silent install switches that have been introduced

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

  • When I do a silent install of Visual Studio 2008 Development Edition using the switch:

    Setup\setup.exe /q /norestart /unattendfile \\server\setup\VS.ini

    The 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:

    WCU\msi31\WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart

    WCU\dotNetFramework\dotnetfx35setup.exe /q /norestart /lang:ENU

    WCU\DExplore\dexplore.exe /q

    WCU\WebDesignerCore\WebDesignerCore.exe /Q /install

    Setup\setup.exe /q /norestart /unattendfile \\iaunswd03\dp$\SMSPKG\D000003b\setup\VS.ini

    Will that be enough to suppress the reboot or am I missing something?

    Regards Alex

  • Hi Lavertal - It is not supported to combine the /norestart switch with the /unattendfile switch.  If you need to use an INI file and also control reboots, you will need to make sure to pre-install any components that could potentially cause reboots, then create the INI file (so that those pre-installed components will not be included in the INI file).

  • 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: Error

    Event Source: MsiInstaller

    Event Category: None

    Event ID: 10005


    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 was

    dotNetFramework\dotnetfx35setup.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.

  • Hi Ac2008 - Unfortunately, this is a known issue with the RGBRast package that is a prerequisite for the .NET Framework 3.0 and 3.5.  If you need to deploy using an account with no local profile, you will need to extract the contents of the RGBRast9 package (it is a single file named rgb9rast_2.dll) and copy it to %windir%\system32 on your target systems prior to deploying the .NET Framework 3.5 and VS 2008.  This component is only needed on x86 Windows XP and Windows Server 2003 systems.

  • 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.

  • 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.

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

  • Hi Garm - The setup.exe does have a /u switch that you can use to do a silent uninstall.  However, that switch will only remove the main vs_setup.msi - it will not remove any of the other MSIs that Visual Studio 2008 setup chains behind the scenes, so I'm not sure how useful it really is.

    What I would recommend doing here is something like this:

    1.  Take the full list of components being installed (from the Manual Uninstall Instructions) section of the topic at http://msdn.microsoft.com/vs2008/bb968856.aspx as a starting point

    2.  Find the product code for each of them by using the MsiInv tool described at http://blogs.msdn.com/astebner/archive/2005/07/01/434814.aspx

    3.  Create an uninstall script that runs msiexec /x for each of those product codes in the exact order listed in that MSDN topic.

    There are some components that you may not want to remove as a part of this uninstall - for example, the .NET Framework 3.5 might be used by other products on your system so you may want to leave that behind.

    I have a question also - could you explain your scenario in more detail.  I haven't run into any cases yet where customers needed to automate the uninstall of VS, so I'd like to learn more about why that is required in your environment.

    Please let me know if you have any problems getting the above steps to work.

Page 1 of 2 (25 items) 12
Leave a Comment
  • Please add 4 and 6 and type the answer here:
  • Post