Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to register Stdole2.tlb under Windows 7

Status
Not open for further replies.

Mike Lewis

Programmer
Jan 10, 2003
17,516
Scotland
I recently came up against this problem, which seems to be quite a common one. Several people have posted questions about it (not necessarily in this forum), so I thought I would post these comments in case anyone here comes across it.

The problem

When installing a VFP application under Windows 7, you see a message saying that the setup program is unable to register stdole2.tlb. The error code is 0x8002801C.

The problem does not arise when installing under XP or Vista.

Background

The message means exactly what it says. Stdole2.tlb is one of the runtime files that need to be installed with a VFP application. The setup program successfully installs the file, but Windows refuses to register it.

If the user ignores the message, the setup program installs the application correctly.

Solution

The solution is simple. Just tell the setup program not to try to register the file. How you do that depends on what install software you are using.

I use Inno Setup. My standard VFP install script includes this line:

Code:
Source: "Runtime\stdole2.tlb";  DestDir: "{sys}"; 
Flags: uninsneveruninstall sharedfile 
onlyifdoesntexist regtypelib

All you need to do is remove the last flag (regtypelib) from this line. Doing that tells the setup program to refrain from trying to register the file. This in no way affects the target application, which should continue to run correctluy (in XP and Vista, as well as Windows 7).

In other install programs (such as InstallShield), the method will be different.

I hope this will be useful for any forum members who come up against this problem.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Thanks for the info, Mike.
Just for enlightenment's sake, what is the function of stdole2.tlb? Is there replacement functionality we would need to use in lieu of that library?


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Dave,

Short answer: I don't know. Stdole2.tlb has always been on my basic list of runtime files that must be installed with a VFP app. I've no idea what it does.

I do know that you don't need any "replacement functionality" for it. I wasn't suggesting that you don't install the file; only that you don't need to register it. (I'm not sure what the point is of registering a tlb anyway.)

That said, for all I know the file is unnecessary. Tell you what .... if I get a moment in the next day or two, I'll try removing it from my Inno script and seeing if I can still install the app. I'll report back.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
I don't want you to go too far out of your way, I have google ;), I was just thinking a reference or an overview within the thread may be helpful to any future readers of this thread.



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
The fox wiki has a very detailed list of needed runtime files. a TLB alone won't do anything, as it's only the typelib definition of some ole class and so it should be acompanied by a dll or ocx or exe anyway. So it may be something you needed way back then.

Bye, Olaf.
 
Olaf,

Of course, you're right. There's no point in installing a typelib definition without something for it to define. I've just tried removing the entire file from the install, and it still works fine.

I don't know where I got the reference to stdole32.tlb from. It's not in the list of runtime files on the Fox Wiki that you mentioned. It's always been in my standard Inno script, but I can't remember where I got that from.

So, the lesson for anyone who sees the same error message is: Remove stdole32.tlb from your setup (unless you know something I don't, which is always possible).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top