cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
PilotBob
Level 5

CustomActionData not passing

Ok, this is driving me crazy.

I have a CA that needs to know the path of the INSTALLDIR to edit an XML file.

So, I set up a set property custom action that sets a property named RemoveAuthTypesNode to [INSTALLDIR]. Then I have a RemoveAuthTypesNode CA that is sequenced after SetConfigFolder (a set property that sets installdir to a system searched path) in the Install Execute Sequence, Deferred in System Context (doesn't work when just Deferred Exec either).

In the log I see that RemoveAuthTypesNode is set:

MSI (c) (D4:EC) [16:12:05:314]: PROPERTY CHANGE: Adding RemoveAuthTypesNode property. Its value is 'C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\'.

The custom action errors:

Error 1720.There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action RemoveAuthTypesNode script error -2146827864, Microsoft VBScript runtime error: Object required: 'objXMLDOMNode' Line 9, Column 1,
MSI (s) (78:EC) [16:12:23:916]: Product: ASMI User Defined Reports -- Error 1720.There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action RemoveAuthTypesNode script error -2146827864, Microsoft VBScript runtime error: Object required: 'objXMLDOMNode' Line 9, Column 1,

This is failing because the path isn't correct so the XMLDom object never loads. I know this because if I hardcode the path everything works fine.

Also, when I search the log for CustomActionData I expected that it would be in there as being set.

Here is the code from the custom action. The msgbox is just for debugging. It is always displaying nothing.

strConfigFile = session.Property("CustomActionData") & "rsreportserver.config"
MsgBox session.Property("CustomActionData")
Set xDoc = CreateObject("Microsoft.XMLDOM")

xDoc.async = False
xDoc.Load(strConfigFile)

set objXMLDOMNode = xDoc.selectSingleNode("//Configuration/Authentication/AuthenticationTypes")
set objParentNode = objXMLDOMNode.parentNode
objParentNode.removeChild(objXMLDOMNode)

xDoc.save(strConfigFile)

Set xDoc = Nothing

What am I doing wrong. I'm sure it's something simple stupid. Help greatly appreciated.

Thanks,
BOb
Edit/Delete Message
Labels (1)
0 Kudos
(1) Reply
PilotBob
Level 5

I finally found the answer after much googling.

You have to sequence the set property CA which sets the property named for the vbscript custom action in the Execute sequence. I assume this is because it is a private (not all uppercase) property and private properties don't pass from the UI sequence to the Execute sequence.

BOb
0 Kudos