Custom Action Error when uninstalling MSI error 2721
Hi
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 receive2721 – 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?
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
[font="times new roman"]
[font="times new roman"]
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
India_Repackaging
15 years ago
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.
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
15 years ago
@India_Repackaging:
- 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.
- 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
15 years ago
Posted by:
mrcheeks
15 years ago
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.
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
15 years ago
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
' Key HKLM\SOFTWARE\HBOS\Uninstall\
' 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 PACKAGEID
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")& "|"
PACKAGEID= GetVar(CSDData)
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)
else
GetVar = ""
end if
end function
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
' Key HKLM\SOFTWARE\HBOS\Uninstall\
' 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 PACKAGEID
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")& "|"
PACKAGEID= GetVar(CSDData)
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)
else
GetVar = ""
end if
end function
Posted by:
anonymous_9363
15 years ago
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.
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
15 years ago
Posted by:
anonymous_9363
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.