Click here to Skip to main content
14,210,255 members
Rate this:
Please Sign up or sign in to vote.
See more:
This is an extension of my previous question[^].

I have now written a very simple dialog-based MFC app with automation enabled. It doesn't do anything at all except display the dialog. It's called "test_server", and was produced using Visual Studio 2008 with absolutely nothing but default settings, just what the New Project wizard produces. I also wrote a standard deployment project for this which just puts the app into Program Files and a shortcut to it onto the Start menu.

I wrote a very simple VBS script:

Set test=Wscript.CreateObject("test_server.Application")
MsgBox "Click to exit test_server",,"Exit"

The script launches the app fine in XP after a clean install (so long as I run the app in stand-alone mode first to register it, which is acceptable), but fails in Vista.

I get the message "Could not locate automation class ..." with the error number 80020009.

I'm quite sure that this must be a well-known issue, but I've steered clear of Vista up to now, and so it's new to me. Any help in solving greatly appreciated. (Obviously, this is just a test stub for a problem involving two much larger MFC programs that interact OK in XP but fail in Vista).


Bill Heitler
Updated 18-Apr-10 4:39am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

My bets are on elevation issue. Have your tried running your stuff as administrator?
Note that your development environment is registering your application in the registry automatically in XP, but on Vista, in order to mess around with HKLM, you require elevated privileges.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.190618.1 | Last Updated 18 Apr 2010
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100