Bug #34340 5.0.51a: MySQLInstanceConfig.exe will not run on Windows Vista
Submitted: 6 Feb 2008 5:58 Modified: 12 Feb 2008 13:45
Reporter: Caitlin Shaw Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.0.51a OS:Microsoft Windows (Vista Home Premium)
Assigned to: CPU Architecture:Any
Tags: Contribution

[6 Feb 2008 5:58] Caitlin Shaw
Description:
I and two other people also running Windows Vista are having the same problem installing 5.0.51a MySQL Community Server (Windows ZIP/Setup.EXE (x86), taking the "Complete Install" option):  when trying to open the tool to configure an instance (MySQL Server 5.0\bin\MySQLInstanceConfig.exe), during install it fails silently and when opening directly it gives the error:

The application has failed to start because its side-by-side configuration is incorrect.

In the application log is this error from SideBySide:

Activation context generation failed for "C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe".Error in manifest or policy file "C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe" on line 6. The value "asAdministrator" of attribute "level" in element "urn:schemas-microsoft-com:asm.v1^requestedPrivileges" is invalid.

The logged-in account has administrator privileges.  Running the MySQLInstanceConfig application explicitly as administrator (instead of just with an account with administrator privileges) produces the same result.  User Account Control is turned off.

Notably, if I install build 5.0.45 I have no errors with this configuration program and can start up MySQL and run it without any errors.

How to repeat:
With 5.0.51a installed, this error occurs on my system and on that of the two people I'm working with consistently.

With 5.0.45 installed, this error never occurs.

Suggested fix:
The release notes for version 5.0.51 list this:

On Windows, executables did not include Vista manifests. (Bug#24732)

This bug report (http://bugs.mysql.com/bug.php?id=24732) mentions similar problems but the final note says that a new bug report should be opened for this problem.  Since I can't find one already open, I'm submitting one now.
[6 Feb 2008 6:43] Marcus McCurdy
The fix is pretty simple. The UAC Manifest should read as follows:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
	<assemblyIdentity name="MySQLInstanceConfig.exe" version="1.0.10.0" processorArchitecture="x86" publicKeyToken="02ad33b422233ae3" type="win32"></assemblyIdentity>
	<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
		<security>
			<requestedPrivileges>
				<requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>
			</requestedPrivileges>
		</security>
	</trustInfo>
</assembly>

Instead of:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
	<assemblyIdentity name="MySQLInstanceConfig.exe" version="1.0.10.0" processorArchitecture="x86" publicKeyToken="02ad33b422233ae3" type="win32"></assemblyIdentity>
	<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
		<security>
			<requestedPrivileges>
				<requestedExecutionLevel level="asAdministrator" uiAccess="false"></requestedExecutionLevel>
			</requestedPrivileges>
		</security>
	</trustInfo>
</assembly>

The requested level "asAdministrator" is the culprit. It should, instead, be "requireAdministrator".

You can use Resource Hacker to fix it yourself, until an official update is made.
[7 Feb 2008 2:49] Caitlin Shaw
Thanks, Marcus!  I can confirm that making that change to MySQLInstanceConfig 5.0.51a does allow it to run on my Vista machine.
[12 Feb 2008 9:56] Jared S
Thanks! now running 5.0.54a on Vista32.
[12 Feb 2008 13:45] Iggy Galarza
This is a duplicate of bug# 30823
[14 Feb 2008 19:06] Don Sartain
Can someone tell me where to edit the UAC manifest??  I know it's an XML file, but the location would be great.

Thanks
[14 Feb 2008 19:14] Jared S
1. http://www.angusj.com/resourcehacker/
2. run it on C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe
3. edit and compile the last resource entry in the treeview
[17 Feb 2008 1:53] Eric Selje
Thank you!  I had the same problem, and that fix worked perfectly.
[18 Feb 2008 23:56] Travis Romney
I've been fighting with this for quite a while.
Your tip worked perfectly!
Thanks!
[25 Feb 2008 13:09] Mike Stewart
I had this problem also and the fix worked on Windows Server 2008.
THanks for the fix!
Mike
[29 Feb 2008 3:44] Rakesh Kamath
Thanks for the suggestion. Works on my Vista VM(running Enterprise).

I guess I am a little suprised a bug as basic as this would get through but then again, we all have been embarrassed by something like this at least a few times.
[16 Mar 2008 9:27] Conaire McKerr
I have ran the solution as you suggested and it worked. After I ran the Resource Hacker and corrected the bug I was able to complete the SQL Server Configuration. However, when I complete everything and open MySQL 5.0 I have a number of very limited options. They are MySQL Command Line Client; MySQL Manual and MySQL Server Instance Congigration Wizard. I don't have access to any other SQL Commands eg, MySQL Administrator and MySQL Query Browser. I've tried re-installing and although everything works fine and completes as expected I still only get the limited options mentioned above. I'm using Vista Business as my OS. Any suggestions.
[21 Mar 2008 18:18] Mihai Bilauca
Thank you very much for the solution and for how to change the XML content. Great help!
[22 Mar 2008 9:11] Mark Dowd
Problem also appears in Vista Business. Solution works just as well. Well done :)
[24 Mar 2008 19:05] Manhyung Han
Refer this page -> http://forums.mysql.com/read.php?11,195569,195569
[31 Mar 2008 20:22] Peter Scher
thx for the tip to resource hacker.

simply search and find the text "administrator", edit "as" to "require", compile, save and run.

You are my hero today.

Regards
Peter
[3 Apr 2008 22:24] Daniel Navarro
I spent two hours to realize that it was a bug.
Thank you for the solution.
[26 Apr 2008 12:45] Tim Spencer
Great fix Marcus, works perfectly on Vista Business SP1.