Custom Action Error when uninstalling MSI error 2721


I'm doing a transform for an application which basically applies some security settings to the local C: drive.

The application installs ok, however during the testing of the un-install option i receive 2721 – Custom action [2] not found in Binary table stream [font="times new roman"]I'm not exactly sure why this is occuring. I have placed the custom action vbs into the Resource tab of the mst. I'm a little bit lost as to what is causing this issue.
[font="times new roman"]
[font="times new roman"]Any ideas?

0 Comments   [ + ] Show comments

Answers (8)

Posted by: India_Repackaging 14 years ago
Blue Belt
Hi Jose,

What kind of a CA is it - Call VBS from Installation, Installed Files or Embedded code? It seems you VBS is not available during uninstall. Kindly check whether you need the VBS to be run during uninstall as well, so you can you NOT REMOVE~="ALL" (during installation and repair) REMOVE~="ALL" (during uninstall).
So basically you need to check the type of CA, condition and scheduling of the CA.
Posted by: anonymous_9363 14 years ago
Red Belt
- Since the error states that the VBS could not be found in the Binary table, it is clearly a 'Run VBScript from Installation'
- Conditioning the CA - although certainly required here to avoid the CA running for non-uninstall scenarios - will make no difference to the actual problem.

@mrcheeks: you'll find you'll have more success if you add the VBS using the 'MSI Script' view and adding an action 'Run VBS from Installation', as that interface will add all the required entries to the relevant tables. Bear in mind that the location of the action (i.e. in Execute imemdiate or Execute Deferred) will affect when it runs and in what context, User or System.
Posted by: India_Repackaging 14 years ago
Blue Belt
Hi Ian,

You right. I missed the part of the error.


Posted by: mrcheeks 14 years ago
Senior Yellow Belt
Hi guys

thanks for the replies, the custom action is a vb script and its already set within the MSI script."call vbs script from installation (custom action)

I also added the custom action within the Resources tab to allow it to populate within the binary field which i can see when browsing the file tables.

Any other ideas??

Just to give you a bit of background, i have an MSI and i have applied a transform that i want to have some local policies applied for the application to be able to write to the C:\progra~1\<appname>

Now i have my *inf file and my *sdb file create. I figured the easiest way was to do a custom action, maybe i'm doing some incorrectly which is causing this to fail? is there another way someone can suggest to perform the same task? i'm running out of time to get this app working.
Posted by: mrcheeks 14 years ago
Senior Yellow Belt
Hi guys just fruther please find below my code for the custom action.
We have a set of Macros which populate the registry with the package id, time stamp and user who installed it, so we have a reference as to what is going on and at what point.

The custom action looks for this entries, (which are present) after running the macro.

The custom action is called as Normal Execute Immediate/Deferred

' Name: LogUninstall.vbs
' Purpose: To mainitain write a log record in the Registry when the Application
' is uninstalled
' Registry
' Value Data
' Application Name and Version [ProductName] [ProductVersion]
' Software Vendor [Manufacturer]
' Removal Details UnInstalled by [LogonUser] on [Date] at [Time]
Dim CSDData
Dim oWshShell
Dim ProductName
Dim ProductVersion
Dim Manufacturer
Dim LogonUser
Dim SDate
Dim STime
Dim RData
Dim RKey
Dim i
Set oWshShell = CreateObject("Wscript.Shell")
CSDData = me.Property("CustomActionData")& "|"
ProductName = GetVar(CSDData)
ProductVersion = GetVar(CSDData)
Manufacturer = GetVar(CSDData)
LogonUser = GetVar(CSDData)
Rkey = "HKLM\Software\<company name>\Uninstall\"
oWshShell.RegWrite Rkey, "", "REG_SZ"
Rkey = Rkey & PACKAGEID & "\"
oWshShell.RegWrite RKey, "", "REG_SZ"
RData = ProductName & " " & ProductVersion
oWshShell.RegWrite RKey & "Application Name and Version" , RData, "REG_SZ"

oWshShell.RegWrite RKey & "Software Vendor" , Manufacturer, "REG_SZ"
RData = "UnInstalled by " & LogonUser & " on " & Date() & " at " & Time()
oWshShell.RegWrite RKey & "Removal Details" , RData, "REG_SZ"
Public function GetVar(CSDData)
' retrieve Values of variables from CSDData
i = instr(CSDData, "|")
If i > 0 Then
GetVar = left(CSDData, i - 1)
CSDData = mid(CSDData, i + 1)
GetVar = ""
end if
end function
Posted by: anonymous_9363 14 years ago
Red Belt
That's all well and good but it still doesn't mean that the script's in the Binary table!

I had assumed by your reference to a 'Resources' tab that you were using Wise. Now, your reference to the CA being 'called as Normal Execute Immediate/Deferred' leads me to think that you're actrually using InstallShield. In that case, go to the 'Direct Editor' view and look for the script in the Binary table. If it's not there, add it.
Posted by: mrcheeks 14 years ago
Senior Yellow Belt
No no you are rite, i'm using Wise. The funny thing is that i can see the customaction.vbs file in the file table.

Ill see if i can post a jpg of it to demonstrtate.
Posted by: anonymous_9363 14 years ago
Red Belt
I suspect, then, that at some point you elected to 'Run VBScript from Installed Files' and added the VBS from the UI.

Remove the file using the UI - it's just going to confuse things and follow the instructions in post #3.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ