Handling Microsoft DLLs and OCXs

Started by shadow, September 15, 2009, 07:35:03 PM

Previous topic - Next topic

shadow

Thanks for all your help.  It's much appreciated.  I think I'm set for now.
 
Your other customer's apparent ArmAccess.dll problem might be something else.  Some of the protection options offered by SoftwarePassport/Armadillo can cause such problems for some programs.  I tried a quick search in the Armadillo Help file for Access Violation and got three hits, so this is something about which they provide advice.  Including the DLL may actually compromise the security (or it may be harmless).  S/He might want to consult with SiliconRealms.

Randem

vb5db.dll is used by some DAO controls, I forget which but if you are not using DAO or a database for that matter you do not need to redistribute it, but it's a small file better safe than sorry. It will drive you nuts trying to figure out what the problem is if you don't realize what happened.
 
InnoScript will drop many files that PDW includes because you should not re-distribute them.
 
As far a the ArmAccess.dll. I am working with a customer on that very issue and if the file is not distributed on some machines you will get the Access Violation Message. We determined that it is better to deploy it. So again better safe than sorry...

shadow

That is actually how ArmAccess.DLL works.  Here's an excerpt from the Help file for the SoftwarePassport/Armadillo API:
ArmAccess.DLL actually refers to two different things: the actual ArmAccess.DLL file distributed with SoftwarePassport/Armadillo, and the virtual ArmAccess.DLL built into every copy of a SoftwarePassport/Armadillo-protected program. The actual file is almost never needed anymore, and you do not have to distribute it with your programs, even if you use it -- SoftwarePassport/Armadillo will redirect all calls to the virtual copy, so long as you use the name ArmAccess.DLL.
 
I found this info on gdiplus.dll (http://community.devexpress.com/forums/p/9008/33785.aspx), which suggests that it is already present for XP and later.  I guess it's best to leave it out of the standard package and deal with it if and when it comes up.
 
Do I understand correctly that if InnoScript does not include a file (even if PDW did), I do not need it?
 
InnoScript includes vb5db.dll, from its VB 6 Redist Files folder; vb5db.dll was not mentioned by PDW. What is vb5db.dll and is it necessary? Is it only necessary when using DAO?

Randem

ArmAccess.dll should be included, if you do not your application will get Access Denied messages upon start. Your security wrapper does not deploy anything.
 
Yes, Eliminate the help files; they should be on every OS. all you need to do is open the chm file and it is associated with the help program that opens it.
 
As far as GDIPLUS you can redistribute it but it is a side-by-side installation and most likely it is already installed. You should probably only redistribute it if your app does not work correctly with the one that is present.

shadow

OK on the removed files and the two OCX files.
 
ArmAccess.dll is embedded in the security wrapper; I will exclude it.
 
hh.exe,itircl.dll , itss.dll and hhctrl.ocx are all part of HTML Help.  Based on http://msdn.microsoft.com/en-us/library/ms669985(VS.85).aspx, I was going to ignore them.  It seems they are almost always available and can be dealt with individually if a problem arises.  They are installed by hhupd.exe from the Help Workshop, but this article warns against running it on XP, 2000, ME and 98 (and presumably later systems) so it seemed better to omit them.  Does this make sense?
 
http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en discusses GDI  (although it could be more definitive).  In your experience, is it better to use this installer or simply to copy gdiplus.dll?  Should gdiplus.dll be installed in the application folder?  Should it be registered?

Randem

As I stated, If InnoScript removed them you are ahead of the game; don't worry about them. Also, those OCX are VB files it is ok to copy them from the system folder. You need to add files to your script if you are using these since they are third party dll/ocx/exe files that are not direcly linked to your application. You seem to be using a security wrapper with your application and it will not work properly unless you include ArmAccess.dll with your installation. InnoScript has no way of knowing that unless it was included as a reference or component.
 
 
hh.exe
itircl.dll
itss.dll
hhctrl.ocx
ArmAccess.dll
GdiPlus.dll
 
Use the Add Files Tab to include these files.

shadow

This is the complete list of unsafe files from the RunLog.
Files Unsafe:
scrrun.dll
ADVAPI32.dll
KERNEL32.dll
GDI32.dll
USER32.dll
COMCTL32.dll
VERSION.dll
ole32.dll
I concluded from Inno Setup Help that ADVAPI32.dll, KERNEL32.dll, GDI32.dll, USER32.dll and COMCTL32.dll should not be installed by me (ie, the user would already have correct copies).  I'm not sure what to do about VERSION.dll and ole32.dll.  Scrrun.dll appears to be a special case.
 
InnoScript is able to find tabctl32.ocx and mscomctl.ocx, which have been copied from {sys} to another folder.  I'm wondering whether it is proper to use copies of what I have in my {sys} folder or whether I should get them from someplace else (if so, where?).
 
Here are my script and some related files (I will clean up the search folders once things stabilize):

Randem

What were the unsafe files? InnoScript will remove any files it deems unsafe from your script. If by unsafe files you are referring to files taken from the system folder, that can take a different direction to correct.  
 
Those OCX files you mention can be copied to another folder then add that folder to the Search Folders tab and InnoScript will find them on the next run.
 
Depending on older versions of OS you install on; you may also need to include older versions of files. Let's see your script.

shadow

Thanks.  As you have advised, I applied InnoScript to a VBP file.  I just used PDW for comparison.  There were 8 unsafe files and no missing files.  I was able to eliminate some of the unsafe files based on the Unsafe Files section of Inno Setup's help.
 
From what you say, I infer that I should install tabctl32.ocx and mscomctl.ocx.  Is it safe to take them from my {sys} folder (I'm using Vista), or should I get them somewhere else?
 
I'm trying not to disqualify any version of Windows outright, but some features are disabled for older systems.  This is not an absolute requirement, however.

Randem

Before I get into all your question; how did you use InnoScript? Did you attempt to convert a PDW Setup.lst file or did you let InnoScript start from scratch? Generally if InnoScript ignores a file it should not be used. That does not mean that if it is MISSING that it should not be used that just means that you haven't told InnoScript where to find the file.
 
All the OCX files are VB files and should be included. There is documentation for InnoScript that tells you what to do if files are missing. To disqualify earlier system, on the main screen just select NONE in the Windows selection are and Windows XP in the NT selection areas.
 
We'll narrow down things as you correct the issues I have mentioned.

shadow

I am trying to migrate a VB6 project to Inno Setup using InnoScript and I'm pleased that you offer a product that embodies so much knowledge of what is required.  I have used PDW to provide additional information.
 
There are still several files about which I am unsure.  I have tried to find information on Microsoft's web site, but with limited success.  Any links to more information would be appreciated.  The Unsafe Files topic under Other Information in the Inno Setup Help file did provide useful information about several files.
 
How should one handle unsafe files?  Should they never be installed?  Are they always present on all versions of Windows?  What about scrrun.dll?  It's flagged as unsafe, but InnoScript added installers for it to my script.  Are other unsafe files similar in nature?
 
InnoScript identified these files (among others) as unsafe:  version.dll, ole32.dll and scrrun.dll.  I know that scrrun.dll has its own installers (more below).  Are version.dll and ole32.dll always present for any version of Windows?
 
Both PDW and InnoScript included tabctl32.ocx and mscomctl.ocx.  Are these always present, or should they be included in the installer package?  If they should be included, where should they be obtained?  Which versions should be used?  InnoScript took them from the Setup folder created by PDW; PDW copied them from {sys}.
 
PDW mentioned VB6STKIT.DLL and msvbvm50.dll (as well as msvbvm60.dll) in its [Bootstrap Files] section.  InnoScript does not mention either.  I've seen elsewhere that VB6STKIT.DLL should not be included.  Is this correct?  What about msvbvm50.dll, which appears to be a VB5 file?
 
InnoScript includes vb5db.dll, from its VB 6 Redist Files folder; vb5db.dll was not mentioned by PDW.  What is vb5db.dll and is it necessary?  Is it only necessary when using DAO?
 
PDW includes MSVCRT.DLL, but InnoScript ignores it.  Is MSVCRT.DLL needed?
 
My old installer package included the following (for reasons I cannot recall; it was created five years ago):  ctl3d32.dll, comdlg32.ocx, mscomct2.ocx and comct332.ocx.  If neither PDW nor InnoScript mentioned them and they are not listed among the project's References or Components, is it safe to ignore them?
 
I understand that scr56en.exe and scripten.exe are needed to install scrrun.dll when it is not already present.  Should we use WindowsXP-Windows2000-Script56-KB917344-x86-enu.exe instead of scripten.exe (see http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAA&displaylang=en)?  Both have the same version number (5.50.4134.600), but yours has a size of 676,312 bytes, while the other has 693,800.  Why does InnoScript apply ignoreversion to scripten.exe and scr56en.exe?  Is it so that those files will always be loaded?  Will the real version check be applied to scrrun.dll when scripten.exe or scr56en.exe is run?
 
On my system, GdiPlus.dll and MSVCRT.DLL seem to appear in many application folders.  Should I install them in my application folder, or should they go into {sys}?  Should they be registered?
 
Should GdiPlus.dll just be copied from my application folder, or should it be handled as follows?
[Tasks]
Name: GdiPlus; Description: Install Microsoft's GDI ; GroupDescription: Install GDI :
[Files]
Source: c:\users\username\documents\visual studio 6\projects\buildcommonfiles\microsoft\GDIPlus\WindowsXP-KB957096-x86-ENU.exe; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; MinVersion: 0,5.0sp4; OnlyBelowVersion: 0,0; Tasks: GdiPlus
[Run]
Filename: {tmp}\WindowsXP-KB957096-x86-ENU.exe; Parameters: ??; MinVersion: 0,5.0sp4; OnlyBelowVersion: 0,0; WorkingDir: {tmp}; Flags: skipifdoesntexist runascurrentuser; Tasks: GdiPlus
Should ignoreversion be used?  Parameters?
 
Because 98.5% of all Windows computers now use XP, Vista or 7, those are my primary targets.  However, if possible, I would prefer not to disqualify earlier systems (95, 98, ME, NT4, 2000) by making poor setup choices.