I have recently repackaged GroupWise 6.5 which has Windows Messaging 4.0 as a dependancy.

The problem is that Windows Messaging overwrites C:\Windows\System32\Mapi32.dll with an older version (one from 1996 to be exact). The dll is required in order for GroupWise to work.

I wish to replace this dll with the one it overwrites if the msi is uninstalled. The best way I can figure to do this is to import the dll into the binary table and use a conditionalised (REMOVE=ALL) custom action to copy it to the system32 folder on uninstall.

The problem is I have no idea how to reference the binary table from within the custom action which I plan to write in VBScript. I could just install the file to the PC and run a custom action to copy it to System32 on uninstall but I think calling it from with in the msi would be better.

Ok thanks for reading...Nik
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
That's a versionned file... how are you ensuring it is replaced by your package?

I don't suppose that particular file could be isolated with the application? It's not on the "KnownLLs" list which is a good start.
Answered 09/06/2005 by: WiseUser
Fourth Degree Brown Belt

Please log in to comment
0
Hi Nik:

In case you want to replace the old dll the that overwrites your new dll, just add the old dll in your package and goto its option or file details rather and mark self - registration option and select unordered (use normal windows installer behaviour) this would register the dll as well replace the one that exists on the system. In case the mapi32.dll that exists on the system is registered then you need to unregister it before you can copy this dll and get it register . You can do this by running this command regsvr32 /u "c:\windows\mapi32.dll"(leave the quotes as it is ). I think this should serve the purpose.
Answered 09/06/2005 by: wiseapp
Second Degree Green Belt

Please log in to comment
0
I'm not sure you can copy a file out of the binary table to the destination computer.. If not and you can't get this working by isolating the old dll (which I guess depends on whether or not it needs to be registered) how about having 2 custom actions written in either Wise or VBScript?

The 1st only processed only on install that makes a backup copy of the original .dll in system32 before the new file is copied over.

The 2nd only processed only on uninstall which renames the backup copy (and re-registers it if required) once the updated mapi32.dll file has been removed.

Bit flakey I guess but not sure you have too many options. As long as you test your head off you should be good. Sounds like a good one for Keefey [:D]

Cheers,
Rob.
Answered 09/06/2005 by: MSIPackager
Third Degree Black Belt

Please log in to comment
0
Hi Packager:

I agree making a backup copy of the dll is a good option. Anyways I want your GMail Invites[;)]
Answered 09/06/2005 by: wiseapp
Second Degree Green Belt

Please log in to comment
0
Hi Bhupesh,

This is problem solved? However

From your Thread can I summerize that YOUR app is not working without OVERWRITING the existing mapi32.dll file? I.e Your App is not working with the newer version of mapi32.dll (OR) Your app works ONLY with the older version which has come with the Vendor of you app.
Please clarify.

Thanks
Answered 09/06/2005 by: The_Repacker
Senior Yellow Belt

Please log in to comment
0
Hi Repackager:

Fortunately it's not my problem[;)]anyways it was a problem with replacing an already existing dll , you could go thru the first post posted by Nik, you would be able to figure out the problem. However Rob and me have given some suggestion let's see whether they work or not?
Answered 09/06/2005 by: wiseapp
Second Degree Green Belt

Please log in to comment
0
Hi guys,

Thanks for the replies. I am sure I can call a file from the binary table in a custom action using VBScript. I just don't know the syntax, have ordered a couple of VB books from Amazon but they take months to delivery them downunder.

So for now it will go in the too hard basket...

Thanks again..Nik
Answered 09/06/2005 by: Nikolas
Senior Yellow Belt

Please log in to comment
0
You CAN export a file from the binary table to a temporary location and then copy it wherever you like. I even posted a similar script here recently.

But don't you think that's a bit untidy??
Answered 09/07/2005 by: WiseUser
Fourth Degree Brown Belt

Please log in to comment
0
Hi Nik:

I think I posted a reply that clearly do not ask for calling vbscript, just add the dll to your project and self register it(see post above) however for unregistering the old dll you need to run a command (see post above) that you could probably program in Wise script editor itself. So it won't be a hard basket for you any more.[;)]
Answered 09/07/2005 by: wiseapp
Second Degree Green Belt

Please log in to comment
0
Thanks for the replies,

WiseUser said You CAN export a file from the binary table to a temporary location and then copy it wherever you like. I even posted a similar script here recently.
But don't you think that's a bit untidy??


I can't see another tidier way to install a different version of an existing file only on uninstallation of the package. Please let me know what you think would be a cleaner option.

wiseapp I am able to overwrite the existing file no problem. Its the replacing it with the overwritten version on uninstall I am having trouble with.

OK happy packaging and thanks again for the posts...Nik[:-]
Answered 09/07/2005 by: Nikolas
Senior Yellow Belt

Please log in to comment
0
Hi Nik:

Then you could probably write a Wise Script that shall unregister your dll that you want to override since Wise is not able to overwrite it since its registered , thats why I said you need to unregister it before ovewriting on the dll.
Answered 09/08/2005 by: wiseapp
Second Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity