A simpler way to silently install Visual Studio 2008 Express Editions (with a caveat)
Recently, I posted some instructions for creating an installable layout for Visual Studio 2008 Express Editions and silently installing the components that are a part of the Visual Studio 2008 Express Edition setups.
In addition, there are some new silent installation command line switches introduced in the Visual Studio 2008 product family. I've heard from some customers asking me why I posted a long, involved set of instructions for silently installing the components for the Express Editions while there is a simple /q switch available for Visual Studio 2008 setup.
The good news is that since the same setup.exe chainer is used by all Visual Studio 2008 editions, these new silent switches can also be used to install the Visual Studio 2008 Express Editions. The bad news is that the Express Editions were not officially designed to support silent installations in this manner, and there is a bug that can prevent the silent install from working in some scenarios without applying one of the workarounds listed at the bottom of this post.
Description of the issue
The installers for the Express Editions assume that they are being run from a location that they have write permissions to (since the normal UI-based installation scenario starts by copying the setup files to the %temp% folder and re-launching setup from there). This means that if you create an installable layout for the VS 2008 Express Editions and then copy it to a read-only network and attempt to run setup.exe /q /norestart, setup will fail with a error message related to the setup file vs_setup.ms_.
Diagnosing the issue
The log file named %temp%\dd_install_*.txt will have an error message that looks like the following:
[03/25/08,11:11:58] Microsoft Visual C# 2008 Express Edition - ENU: ***ERRORLOG EVENT*** : ERROR_FILE_NOT_FOUND/ERROR_INSTALL_PACKAGE_OPEN_FAILED returned in CRootComponent::Install for: \\myserver\myshare\Visual C# 2008 Express Edition\VCS\vs_setup.ms_
Earlier in the log file, you will see the true root cause of this error:
[03/25/08,11:11:32] Microsoft Visual C# 2008 Express Edition - ENU: CreateProcess launched with cmd line: \\myserver\myshare\Visual C# 2008 Express Edition\vcs\.\.\Ixpvcs.exe "\\myserver\myshare\Visual C# 2008 Express Edition\vcs\.\.\Ixpvcs.exe" /Q /X:"\\myserver\myshare\Visual C# 2008 Express Edition\VCS\"
[03/25/08,11:11:57] Microsoft Visual C# 2008 Express Edition - ENU: \\myserver\myshare\Visual C# 2008 Express Edition\vcs\.\.\Ixpvcs.exe exited with return value: 5
These log entries show that setup is attempting to extract the contents of ixpvcs.exe to the network share that setup is being run from, and it fails with return value 5 (which means access is denied, most likely because the network share is read-only).
How to work around the issue
Fortunately, there are a few options that can be used when deploying the Visual Studio 2008 Express Editions with the new /q switch in order to work around the above issue:
Extract the contents of the main express edition setup package to the folder on the network share that hosts the setup files for the Visual Studio 2008 Express Editions.
For example, in the Visual C# 2008 Express Edition, you can do this by running ixpvcs.exe /x and selecting the path to extract the files to. When using this option, your installable layout as described in this blog post should contain both ixpvcs.exe and the files vs_setup.msi and vs_setup.cab that are inside of ixpvcs.exe in the root folder next to the file setup.exe.
Grant write permissions to the network share that hosts the setup files for the Visual Studio 2008 Express Editions
Copy the setup files for the Visual Studio 2008 Express Edition that you want to install in silent mode to the local computer and run setup from there instead of running setup directly from the read-only network share
Putting it all together
Once you use one of the above workarounds, you can install a Visual Studio 2008 Express Edition in silent mode by running the following command line just like you can in Visual Studio 2008 Standard Edition and higher:
setup.exe /q /norestart
One note - the previous blog post I wrote about the new silent switches mentioned a /full switch. This switch is not applicable to the Visual Studio 2008 Express Editions because they do not offer any selectable features that are not installed by default. So there is no need to use the /full switch during a silent install of a VS 2008 Express Edition.
Comments
Anonymous
May 03, 2008
Just checked the reports in FeedDemon, and I think it's only fair that if you haven't bloggedAnonymous
December 01, 2010
Hello grateful as I can help, I have the following problems with visual basic 2010 express I get this error: Error 1311. no source file is C: Program Files Microsoft Visual Studio 10.0 Microsoft Visual Basic 2010 Express - vs_setup.cap ENU , verify that the file exists and that access may I can download that file as I'm missing: vs_setup.cap ENU? it will not let me repair and reinstall, or uninstall either. And therefore when I try to create a new project in VB I get the: new project / item dialog could not be due to an initialization error, exception type, microsoft.visual studio. dialog boxes. exception dialog initialization, was released. my pc has windows vista starter, 1.00 GB of memory and the Intel (R) Core (TM) Duo CPU GHz T5550@1.83 Waiting for your prompt response ... Problem repair or uninstall Visual Basic 2010 Express Now if you understand me? Urges me to solve this problem .Anonymous
December 01, 2010
Hi LILI_21 - If you are not able to repair or uninstall Visual Basic 2010 Express, then I'd suggest trying to use manual uninstall steps like the ones listed at blogs.msdn.com/.../487096.aspx, then try to re-install Visual Basic 2010 Express after performing those uninstall steps.Anonymous
May 05, 2014
Visual Studio Express, installed through the .msi found inside ixpvcs.exe, doesn't recognize that .NET Framework 4.0 or higher is installed on a Computer and therefore it shows an error when loading a project using .NET 4.0 or higher. I faced this issue on every machine I tried it, with Windows XP and 7Anonymous
May 06, 2014
Hi EbrithilBowser - This blog post is about Visual Studio 2008. VS 2008 shipped with the .NET Framework 3.5, and because it shipped before the .NET Framework 4 was released, it doesn't know how to recognize the .NET Framework 4 or higher. From the docs at msdn.microsoft.com/.../bb398197(v=vs.90).aspx, VS 2008 allows you to target the .NET Framework 3.0, 3.5 and 3.5 SP1.