Click here to Skip to main content
15,887,392 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
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:

VB
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).

thanks,

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

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900