How to work around product key issue with new Visual Studio 2008 silent switches
I previously wrote a blog post describing some new silent install switches that have been introduced in Visual Studio 2008 setup. Unfortunately, an issue was recently found with these switches that can cause installation to fail.
To summarize the issue, if you attempt to use the /q and /full switches for Visual Studio 2008 setup, and the copy of Visual Studio 2008 that is being installed is not configured to have a pre-populated product key, then setup will fail during the CA_SetPidProps custom action that runs as a part of the main vs_setup.msi.
There are a couple of options that will allow you to work around this issue:
Option 1 - Pass the product key via command line when running setup
You can provide an additional command line parameter to the Visual Studio 2008 setup.exe to specify the product code that will be used during installation. The command line will look like the following:
<VS install location>\setup\setup.exe /q /msipassthru=BEGIN" PIDKEY=xxxxxxxxxxxxxxxxxxxxxxxxx "END
You need to replace xxxxxxxxxxxxxxxxxxxxxxxxx in the above example command line with the actual 25-character product key for your copy of Visual Studio 2008 with no dashes included.
Option 2 - Add a pre-populated product key to the VS setup data file
You can use the following steps to add a product key to the appropriate Visual Studio 2008 setup data file in order to cause the key to be automatically pre-populated during unattended Visual Studio 2008 setup:
Copy the VS installation files to a location that you have write permission to
Open the file <VS install location>\setup\setup.sdb in a text editor such as Notepad
Go to the end of the file and locate the section named [Product Key]
Press enter and add the product key to the line immediately after [Product Key] so it looks like the following:
[Product Key]
xxxxxxxxxxxxxxxxxxxxxxxxxSave and close setup.sdb
Run <VS install location>\setup\setup.exe /q to install silently and have setup use the product key specified in setup.sdb
You need to replace xxxxxxxxxxxxxxxxxxxxxxxxx in step 4 above with the actual 25-character product key for your copy of Visual Studio 2008 with no dashes included. You do not need to modify setup.sdb if you already see a 25-character product key listed in this file.
Comments
Anonymous
December 17, 2008
PingBack from http://blogs.msdn.com/astebner/archive/2007/09/12/4887301.aspxAnonymous
March 01, 2010
Tip for anyone else trying this with Dev10 - try it without spaces in the quotes around the PIDKEY. :-/Anonymous
February 23, 2016
I use Visual Studio 2008 at work. I am trying to download Visual Studio 2010 express at home. I am mostly self taught in Visual Basic and C#. I figure if I do my learning at home I won't make a mess at work. i can find the four 2010 languages but not the Visual Studio part. I also can't register what I have. Microsoft says what I am looking for doesn't exist. I think it does. jmmcleana8@juno.comAnonymous
February 23, 2016
The comment has been removed