Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Error 1720-Custom Action Called At Uninstalled


6 replies to this topic

sanjoygr

sanjoygr
  • Full Members
  • 76 posts

Posted 27 April 2006 - 11:29

using Installshield Version 11.0
Basic Windows MSI

Error-1720 -There is a problem with this Windows Installer package. A script required for this install to complete could not be run.

OS- Windows Professional


I am using "Html2Rtf.dll" in my Application. This is free distibutable.
However this has to be registered in the m/c while installing the application.
So I created a Comserver Component and registered it.

Now when I un-register the application the folder is removed but the class id is not.

So I want to create Custom action to do so.
Process Running:Synochronous(Check Exist Code)
In-Scipt Execution:Immediate Execution
Execution Schedule:Execute Only Once
Install Exec Sequence:After Remove Files
Install Exec Cond:REMOVE ="ALL"

CODE

The VB Script which is stored directly with Custom Action.
Option Explicit
Dim InstallDefaultPath    
   'InstallDefaultPath=Session.Property("INSTALLDIR")
InstallDefaultPath="C:\Inetpub\wwwroot\SPLMain\"
InstallDefaultPath=Trim(InstallDefaultPath)
regsvr32 -u  InstallDefaultPath & "SharedDLLs\" & "Html2Rtf.dll"



chrpai

chrpai
  • Full Members
  • 26 posts

Posted 29 April 2006 - 06:16

regsvr32 is not a command in the VBScript language. You need to create the Wscript.Shell object and call it's Run method. Better yet, you need to get rid of the custom action all together and author the DLL into a component, extract it's COM signature and let Windows Installer do the work for you without all the plumbing.
Christopher Painter, MCSE
Author of:
DeploymentEngineering.com
MSI Factory Provider for ADO.NET 2.0 (Work In Progress)
99 Bottles Of Beer - Windows Installer

PM for personal communication only. Please ask questions in the forums.

sanjoygr

sanjoygr
  • Full Members
  • 76 posts

Posted 02 May 2006 - 08:05

Dear ChrPai,
Thanks for your reply.
I would like to have followed your advice for creating a component for authoring
the com dll and extracting the COM signature.
However in this method I find after uninstallation the dlls are physically removed but when I search them using regedit I find their entries in CLSID.
Method I followed:
Selecting the destination folder and right click the mouse. Select Launch Component wizard.
Then two options comes.
a.Create Component for me using best practises
b.Let me select select a type and define the component myself.

I selected the 2nd option .

Then selected ComServer. Gave the destination folder under the subfolder under installdir.
Gave the COMserver File physical location with extract registration information
[Should I select Interop.XYZ.dll or XYZ.dll only ?]
Then select Next anmd finish button.

Check that a key file is created for the dll.
Right Click on the property of the key and check self register.
Only then I find it is working while I call the DLL from my other .Net dll
Please let me know where is the error in my process.

Thanks
Sanjoy

Edited by sanjoygr, 02 May 2006 - 08:21.


russellperry

russellperry
  • Full Members
  • 31 posts

Posted 09 May 2006 - 15:21

Do not select "self-register" for the COM server file. Windows Installer cannot monitor the registry entries for self-registered COM servers -- this is why the CSID is still in the registry after uninstall.

InstallShield is already creating the COM registration info for you when you select "Extract COM Data for Key File," so self-registration is uneccesary in any case.

Edited by russellperry, 09 May 2006 - 15:21.


sanjoygr

sanjoygr
  • Full Members
  • 76 posts

Posted 17 May 2006 - 13:21

Dear Russellperry,

Thanks for your reply.

I have tried with not selecting self register.

Application does not work without self registration.

Thanks
Sanjoy


russellperry

russellperry
  • Full Members
  • 31 posts

Posted 17 May 2006 - 15:32

I have a couple of those myself. If the InstallShield extracted COM info doesn't register the control correctly, and you have to use "self-register," then the CLSID info will always be there after the uninstall. Your only other option is to "watch" the self-register process and recreate the registry entries in InstallShield yourself.

A related question for anyone who might know: how does InstallShield extract COM data? Where does it look to gather all relevant reg entries?

Edited by russellperry, 17 May 2006 - 15:33.


russellperry

russellperry
  • Full Members
  • 31 posts

Posted 18 May 2006 - 18:30

Actually I take that back. InstallShield does try to unregister self-registered COM controls by calling regsvr32.exe with "/u" on uninstall (which calls the server's DllUnregisterServer method). So, I'm not sure why your CLSIDs are still around after uninstall.