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 (26)

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

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

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

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

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

  6. lavertal says:

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

    Setupsetup.exe /q /norestart /unattendfile \serversetupVS.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:

    WCUmsi31WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart

    WCUdotNetFrameworkdotnetfx35setup.exe /q /norestart /lang:ENU

    WCUDExploredexplore.exe /q

    WCUWebDesignerCoreWebDesignerCore.exe /Q /install

    Setupsetup.exe /q /norestart /unattendfile \iaunswd03dp$SMSPKGD000003bsetupVS.ini

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

    Regards Alex

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

  8. says:

    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

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

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

  10. says:

    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.

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

  12. Garm says:

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

  13. 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 as a starting point
    2.  Find the product code for each of them by using the MsiInv tool described at

    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.

  14. Seiba says:

    "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?

  15. Hi Seiba – No, there is not an unattended switch available for VS setup that will show progress UI but not require any user interaction.  If you require this functionality for your install experience, you will need to do one of the following:

    1.  Implement your own progress UI in a wrapper that you use to call setup.exe /q /norestart behind the scenes
    2.  Call each of the individual packages that are a part of VS setup directly and pass in the /qb switch.  If you choose this option, you can find information about all of the components that need to be installed in the administrator’s readme at

    Also, if this unattended scenario is important to you, I also encourage you to report a feature suggestion for future versions of Visual Studio on the Connect site at

  16. Seiba says:

    Thanks Aaron,

    this is really a feature that should be implemented in future versions …

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

  18. shwetakaralkar says:

    i am able to install the setup using the command setupsetup.exe /q /norestart

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

  19. Hi Shwetakaralkar – I wrote a separate blog post explaining how to pass a product key in when using the /q switch.  You can find that at

    Visual Studio setup does not support installing the start menu shortcuts to a non-default location, so there is not a setting available to do this in silent mode either.  You would need to manually copy the .lnk files to new locations if you want the start menu shortcuts in different places on the systems you install VS on.

    I’m not sure why you wouldn’t be able to use /CreateUnattend to create an .ini file.  What is the exact command line you’re using when you try to create an INI file?  Do any logs get created in %temp% when you try to create an INI file?

  20. tcguy100 says:

    Hello Aaron, I wasn’t sure if I should post this here or in one of your other articles (particularly, 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!

  21. Hi Tcguy100 – It is possible that one of the components installed by VS 2005 is interfering with the INI file you created to install VS 2008 if you created the INI file on a system that didn’t have VS 2005 at the time of INI creation.  The best way to create an INI file for unattended installs of Visual Studio is to create them on a system that exactly matches the configuration of the target systems you plan to deploy to.  Things that can affect what is populated into the INI file are OS version, OS language, pre-installed applications, etc.

    It would also help to look at the log files created during your failing VS 2008 installation attempt on one of these systems.  There is a list of log files created by VS 2008 setup at

    A couple of other notes here:

    The bug that I described a workaround for in affects VS 2005 setup but I believe it was fixed in VS 2008, so you should not need to manually update your INI file for VS 2008 as described in that post.

    Your devs are correct – VS 2005 and VS 2008 can install and run correctly side-by-side on the same system.

  22. Yeung Siu says:

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

  23. Arpit Tyagi says:

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

Skip to main content