Mike Lewis
Programmer
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:
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
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