Thursday, May 24, 2007

Installing the WTL 7.5 Application Wizards in VS 2005 under Vista

Don't even try to use the install script: it will not work. Vista's security mechanisms prevent the script from doing anythig on your VS 2005 install directories. I just went through this situation this morning and realized there was just one way to go about it: manually.

It's not that difficult, but took some time to reverse-engineer what the script was doing. The first thing you need to do is to locate the VS application wizards directory. In my case it's in:

C:\Program Files\Microsoft Visual Studio 8\VC\vcprojects

Under this directory you must create a new one named WTL (what else?). Now go to the directory where you installed the WTL 7.5 files and copy the following files:

WTLAppWiz.ico
WTLAppWiz.vsz

to the vcprojects directory. You will need administrator clearance to do this. Now change the security settings of WTLAppWiz.vsz to allow editing. Change it so it looks like this:

VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine.8.0
Param="WIZARD_NAME = WTLAppWiz"

Param="WIZARD_VERSION = 8.0"
Param="ABSOLUTE_PATH = D:\src\WTL75\AppWiz\Files"
Param="FALLBACK_LCID = 1033"

Replace the D: path with your own WTL 7.5 directory. Finally, copy the WTLAppWiz.vsdir file to the WTL directory you created before and, going through the same security checks you did for the vsz file, change it so it reads:

..\WTLAppWiz.vsz ATL/WTL Application Wizard1An application that uses the Windows Template Library. 67774096#1154

You are done.

3 comments:

Unknown said...

How about using the easy way?
Just right click the install script and choose "Run as Administrator" or run it on an elevated permissions command line, opened by clicking a shortcut to "cmd.exe" and using the same "Run as Administrator" option!

For sure it will allow you to write on the "C:\Program Files" folders! :)

João Paulo Figueira said...

This just shows how Vista-impaired I am... I checked your two options and only the second is feasible (on my system, at least). When I right-click on the .js file, the shell shows no option to run it as an administrator (maybe because it is a js file?). Well, next time I will run cmd.exe as admin. Thanks for the quick lesson!

Unknown said...

Glad to help! :)

I found that the hard way: installing Sun's Java JRE old versions (not Vista compatible) didn't work unless I launched the installer "as Administrator"; I think they have fixed this on the current versions!