stodle2.tlb error

Started by davethomson, November 04, 2014, 11:33:40 PM

Previous topic - Next topic

Tom Buggy

After a few hours of research I believe I have a definitive conclusion about the stdole2.tlb situation -- namely, that the file is NOT NEEDED in any Visual Basic installation script since at least the release of Windows XP.

This conclusion is based on Microsoft's Support Statement for Visual Basic 6.0 on Windows Vista, Windows Server 2008, Windows 7 and Windows 8, updated in November 2012.  This document contains a list of VB Runtime Files that are shipped in and supported by various Windows versions, including 32-bit and 64-bit versions where applicable.  In addition to the Windows versions that are part of the document title, Windows 2000 Professional and all editions of Windows XP are included in a table of applicable "shipped in and supported by" Windows versions.

The stdole2.tlb file is in the list of files shipped with the specified Windows versions (as are 5 other files in my script).  Therefore, I conclude that the stdole2.tlb file does not need to be included in an installation script targeted at the specified Windows systems.  If anyone reading this disagrees your input is desired and welcome.

As an aside, a question -- why should any installation tool include files which are shipped with Windows in its generated script?  It seems that such files should be excluded by the tool, either directly in code or via something like the Unsafe Files list included in InnoScript.  Further, and without meaning to be contentious, I do not believe that the discovery of problems related to script inclusion of files shipped with Windows (e.g. the stdole2.tlb registration problem) should be left to testing by the application developer when such problems can be avoided by the installation tool.

davethomson

I am sorry but I have no idea what you want me to do.  In INNOSCRIPT I click on "Templates" on the left hand side and it does show one template.  But double clicking on it does nothing. If I go to Windows Explorer and drill down in the Program Files to "VB 5 RedistFiles" I can delete the "stodle2.tlb" but that doesn't resolve the program when I use INNOSCRIPT again.  So, since I am a complete novice using InnoScript whereas you are the expert I have no choice but to use the simple method to get rid of stdole2.tlb: delete any reference in my .iss file when loading it when using InnoSetup.

So, I will just delete these lines in the .iss file:

   ; OLE Automation - (stdole2.tlb)

   Source: C:\Program Files (x86)\Randem Systems\InnoScript\InnoScript 11\VB 6 Redist Files\stdole2.tlb; DestDir: {sys}; Flags:  regtypelib restartreplace uninsneveruninstall;

and then InnoSetup will give me an .exe that then executed will not give me the stdole2.tlb error which I ignore if it happens which won't happen anymore as I have deleted the line above.

I have no idea what you mean by "Leave the references alone ..."  Where I am to leave the reference alone? In InnoScript or InnoSetup or where?

Anyway, thanks for trying to help this old man figure out what to do.  Apparently it is impossible for me to understand what to do.  Sorry I am so ignorant  and unable to comprehend your solutions to the my problem.  I have a "work-around" so I will no longer bother you will this "stdole2.tlb" problem of mine.

Randem

No, 2 & 3 are completely different. 2 will remove the whole line from the script and 3 will only replace the line in the script. To add the line in the template all you need to do is open the template file the same way as you would open the unsafe file. Double click on it, it will open in Notepad and then type in or copy/paste the line into the file as described in the help documentation with examples. It has to be in the correct Inno Setup Section of course in order to work.

Leave the references alone... :) Those lines are for informational purposes only. They tell you what your project has referenced. If you want to get rid of a reference you go into your VB6 project and eliminate it there.

davethomson

Oh, my  :-[  As to your suggestions:

"2 - Add the Line that you want removed to a template (preferably the one with your project name) with a minus sign as the first character in the line. Regenerate the script and the whole line will be removed each time you regenerate the script."

I have no idea how to "Add the line ..." to a template.  In InnoScript the "Templates" on the left side only will display the current (or other) templates. So, how do I add the line to my template?  I see I can add a new template but nothing there to edit the template.

"3 - Copy the line to the project template, then change the line to be exactly what you want it to be (leaving the file name the same). The next regeneration of the script the new line will replace the old line in the script."

Isn't 3 the same thing as 2? 

I took out the ";" in front of stdole2.tlb but when I regenerated the script the two references to stdole2.tlb were still in the script.

I guess the easy way for me now is other "3" option: "3 - Manually delete/change the line each time you regenerate the script."  At least I know that will always work when using InnoSetup and will give me a "clean" .exe.

Thanks for all your comments.  :D

Randem

That is correct! It is the developers responsibility to make sure the application works. InnoScript is just a tool to help you deploy your application NOT develop it. That would be like blaming VB6 for the issue and that is where the file came from. VB6 is a tool to help you develop your application. There is no substitute for testing and that is what MUST be done and that is on the developer / tester. We can only point you in the correct direction, we do not debug it for you.

Tom Buggy

You say: "In earlier OS's it appears to have been needed, Since Windows 7 it may not be needed."  (my underlines)

What I know is that the "Unable to Register" situation occurs only on my Windows 7 and 8.1 systems; it does not occur on my Windows XP systems (development or virtual).  I'm not sure if this is a registration situation only (possibly RegTypeLib versus regsvr32) or both a "file need" and registration situation.  I also know that removing the RegTypeLib Task doesn't appear to have an adverse effect on app operation.

Given "All the answers will be gotten from testing not creation of the script." what I now understand is that I cannot expect answers about a system situation from InnoScript development, despite my belief that InnoScript is a system tool.

Randem

In earlier OS's it appears to have been needed, Since Windows 7 it may not be needed. If the installation complains about it, you have to test without it to see if it is needed. If you test and everything is OK, then eliminate it. If not then you will need to find the replacement operation that will not use this file on the target OS. All the answers will be gotten from testing not creation of the script. Creation of the script only allows you to get to point of testing.

Tom Buggy

Dave, yes, editing in Inno Setup is always a possibility.  But, as Randem points out, there are ways of eliminating the file in InnoScript one-time-only which eliminate the need to edit in Inno Setup each time you generate a script.

Randem, the larger questions are whether or not stdole2.tlb is needed and, if it's not, why is it placed in the script.

Randem

It is ALWAYS the same approach to remove a file that you do not want in your script as covered in the documentation...

1 - Add the file to the unsafe file list then regenerate the script. The file will be removed from the [Files] section.
2 - Add the Line that you want removed to a template (preferably the one with your project name) with a minus sign as the first character in the line. Regenerate the script and the whole line will be removed each time you regenerate the script.
3 - Copy the line to the project template, then change the line to be exactly what you want it to be (leaving the file name the same). The next regeneration of the script the new line will replace the old line in the script.
3 - Manually delete/change the line each time you regenerate the script.

It works the same EVERY time if you follow these direction... However if you do things differently; then different results will happen. It is all under USER control.

davethomson

Ok, simple fix ... in InnoSetup read in the .iss file ... delete any reference to "stdole.tlb any place I find it... then compile ... then install ... and works with no problems.  This should do it ... all I have to do is remember each time I compile to remove any offending "stdole.tlb" from the .iss file.  ;D

Tom Buggy

Not to beat an old horse, but the stdole2.tlb situation seems inconclusive.  One suggestion was to remove the Regtypelib task; another was to place the file in Unsafe Files; another was to eliminate the file from a script via a template.  In the latest 11.4.4 release the file is in Unsafe Files but is commented out (; prefix).  What to do?

Also, the API-MS-Win-Security-Base-L1-2-0.dll file which continues to be reported as missing in my script on a Windows 8.1 system is not part of the new Unsafe Files list (only the API-MS-Win-Security-Base-L1-1-0.dll file is there).  Furthermore, when I place the file in Unsafe Files (via the left-side menu item in InnoScript) and run Create Script, the file continues to be listed as missing.  How to resolve?

Randem

It is referenced that is informational... It should not be under files.

davethomson

Just to be safe I looked for any file in "Unsafe Files" that had the extension of .tlb.  Found a lot and then, way down in the list, found STODLE32.TLB. So added "STOBLE2.TLB" and generated a new .iss file. NOPE - still under references. Can't figure out where you want me to add the name in the UNSAFE FILES.

davethomson

1st, in InnoScript, I clicked on "Unsafe Files" and got this huge list of files.  In this file I placed "stodle2.tlb" just under the first [Windows] as I had no idea where to place it so it was a guess on my part. Then I regenerated the .iss file.  And, yes, that file is still under "References".

Randem

Did you regenerate the script after placing the file in the unsafe file list. How did you place the file in the list? where was the unsafe file that you placed the file name into?