抵抗不住WINDOWS 7的诱惑,花了点时间重新装了系统,把VS2008也装好,在装Visio 2003 for Enterprise Architects却发现装不上了,提示说VS的版本不对。才知道原来是装了VS2005后再升级到VS2008的,但平时工作数据库建模时常用到Visio,怎么办,难道装个VS2005后再安装?试了几种方法都不行,后来找到这篇文章,看起来可行,照板煮碗做一遍,居然成功了。
Visual Studio 2008 and Visio for Enterprise Architects
星期六, 7 六月 2008 11:41 by jf26028
So, I rebuilt a workstation because I am soon to lose my current wicked awesome hp laptop. Like many people, reloading a workstation is both, a pleasure and a pain. On one hand, you get to refresh your xp installation, so everything seems super fast again. On the down side, none of your tools, plug-ins, extensions, settings, or any of that stuff is in place, so you have to redo all that work.
Anyway, I installed visual studio 2008 and Visio. Then, like zillions of other people, I said "Hey! Where did the generate menu go?". Turns out, Visio Professional is just not quite professional enough to generate a script from a database diagram. Good grief. So, where is this Enterprise Architect version? Sweet. Its on msdn. Pulled it down, and started to install, and soon, all would be well in the world....or so I thought.
Now, I came up against the dreaded "You must first install one of the qualified Visual Studio editions" or it's evil cousin "you must first install visual studio 2003 enterprise architect". Blast! Turns out, you can only install the good Visio if you have visual studio 2003 or 2005 enterprise architect installed. You have got to be kidding me. I have msdn. I have access to both of those applications. I do not want to re-install visual studio 2005 over my new, pristine 2008 installation, but I really need Visio, with the generate functionality.
Well, after lots of searching, and accepting the fact that I was probably violating some sort of licensing agreement, I came up with a hack workaround. If you have an installation of visual studio 2008, and want Visio enterprise architect, but do not want to install visual studio 2005, this can work for you. I gave filemon a try, but it didn't look like it was doing anything interesting. Then, I gave regmon a try, filtered on msiexec, and found some interesting keys. The last thing it did before bailing out on the installation was look in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0. I did have that key in my registry, but it obviously didn't have exactly what the installer was looking for. In the 9.0 folder was my visual studio 2008 installation.
I exported the 8.0 folder using regedit for a backup, exported the 9.0 folder, opened the exported .reg file, did a search/replace on "9.0" to "8.0", and saved it. Then, I imported the modded 9.0->8.0 .reg file into the registry, basically pretending that my visual studio 2008 installation was actually a visual studio 2005 installation, at least as far as the registry was concerned. Fired up the Visio installer, and, kachow, it worked. After installing, I reverted back to my original 8.0 export, and everything is good to go.
It is a hack to get you going, but if you have the same problem, and are crazy like me, this can get you going.
直白一点的说,就是行把注册表下的HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0键值备份,然后把HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0的内容导出,把导出的注册表文件中的9.0都替换成8.0,再把修改后的文件导入注册表,这时安装就顺利完成。装完再把8.0键值删除,把备份的8.0内容导入,成功安装,使用也一切正常。真是满佩服的,这么难想的招也能想出来,呵呵。