Bug #39019 Visual Studio path is hardcoded in .NET connector installer
Submitted: 25 Aug 2008 18:57 Modified: 8 Sep 2008 12:40
Reporter: Fredrik Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:5.2.3 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: hardcoded, installer, path, Visual Studio

[25 Aug 2008 18:57] Fredrik
Description:
When i try to install the .Net connector on my PC the Installer is interupted before the end, and only says that it was ended prematurely, without any describing error.

I enabled verbose logging on for MSI installers, and found this:

CAQuietExec: "D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\\devenv.com" /setup
CAQuietExec: Error 0x80070002: Command failed to execute.

I have installed Visual Studio on "E:\Visual Studio 8\" - NOT the default path. 0x80070002 means "file not found/missing", which is correct.

More info here:

http://forums.mysql.com/read.php?38,223330,223330#msg-223330

How to repeat:
Install Visual studio to a NON-DEFAULT path.
Install .Net connector v5.2.3 (or any other)

Suggested fix:
Do not use a hardcoded path to Visual Studio.
[28 Aug 2008 19:40] Reggie Burnett
Fredrick

The installer does not have the path hardcoded.  What it does is retrieve the registry value SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\EnvironmentDirectory.  Can you check that registry value on your system and tell me what it's value is?  Also, can you tell me the value of SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\EnvironmentPath on your system?
[29 Aug 2008 15:59] Reggie Burnett
This is not a bug.  We do not have the path of VS hard coded.  We read it directly from the registry so the users registry must be messed up.
[29 Aug 2008 19:48] Fredrik
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\ has wrong path info's. So it's my fault. I have know idea why this is even there, since i don't have Visual Studio 2005 installed (8.0 = 2005?)

But HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\ has correct path info's. Shouldn't the MySQL installer read these values instead, since that is the latest version installed on the system?
[29 Aug 2008 20:09] Reggie Burnett
It reads both.  The installer attempts to register the product with VS 2005 and 2008.  So it reads the 8.0 key for VS 05 and the 9.0 key for VS 08.
[29 Aug 2008 20:39] Reggie Burnett
I am marking this as verified, not because we hard code paths but because our installer was not handling gracefully the case where the path or target doesn't exist.
[29 Aug 2008 20:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/52936
[29 Aug 2008 20:44] Reggie Burnett
fixed in 5.3.0
[8 Sep 2008 12:40] Tony Bedford
An entry was added to the 5.3.0 changelog:

The Connector/NET installer program ended prematurely without reporting the specific error.