This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Error 2762.Cannot write script record. Transaction not started.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 03, 2011
08:20 AM
Error 2762.Cannot write script record. Transaction not started.
This is the error message from the installer log:
[CODE]
Custom Action "UpdateInstallConfig" has the following settings:
Here is the script being executed:
This is preceded by Custom Action "InstallConfigData" that is an Immediate Action scheduled to run in Install Exec Sequence After Cost Initialize.
I am very new to InstallShield, and MSI's in general - so any and all help would be very much appreciated.
BTW - The purpose of the CAs is allow the user to change the Product ID and Company Name after install. These values are stored in an XML file which lives in our "ProductName\Client" directory that by default is installed to Program Files. Using an Immediate Action to edit and save the XML file fails (at the save) when the user launched the installer from Add/Remove Programs (Change button). I think is due to the CA not have the correct permissions to change the file when executed in this manner.
[CODE]
Action start 9:01:36: UpdateInstallConfig.
MSI (c) (30:44) [09:01:36:340]: Note: 1: 2762
Error 2762.Cannot write script record. Transaction not started.
MSI (c) (30:44) [09:02:23:156]: Product: ANCILE uPerform Client -- Error 2762.Cannot write script record. Transaction not started.
[/CODE]MSI (c) (30:44) [09:01:36:340]: Note: 1: 2762
Error 2762.Cannot write script record. Transaction not started.
MSI (c) (30:44) [09:02:23:156]: Product: ANCILE uPerform Client -- Error 2762.Cannot write script record. Transaction not started.
Custom Action "UpdateInstallConfig" has the following settings:
- VBS script, stored in binary
- Synchronous (Check exit code)
- Deferred Execution in System Context
- Install Exec Sequence = After InstallInitialize
- Install Exec Condition = _IsMaintenance = "Change"
Here is the script being executed:
Dim CAD ' custom action data
Dim arrayCAD ' array of CAD data after split
Dim strLanguage ' Language for install.config
Dim strCompanyName ' COMPANYNAME for install.config
Dim strProductID ' PRODUCT_ID for install.config
Dim InstallDir, fso, xmlDoc
Dim xPE
Dim strErrText
Dim strFileName
CAD = Session.Property("CustomActionData")
arrayCAD = Split(CAD, "||")
strLanguage = arrayCAD(0)
strCompanyName = arrayCAD(1)
strProductID = arrayCAD(2)
InstallDir = Session.Property("INSTALLDIR")
Set fso = CreateObject("Scripting.FileSystemObject")
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async = "false"
xmlDoc.validateOnParse = False ' turn off parse on load to avoid parse errors
LogInfo "UpdateInstallConfig: " & "Checking for install.config file."
LogInfo "UpdateInstallConfig: " & InstallDir & "Client\install.config"
strFileName = InstallDir & "Client\install.config"
If (fso.FileExists(strFileName)) Then
If xmlDoc.load (strFileName) Then
LogInfo "UpdateInstallConfig: " & "Config file opened successfully."
xmlDoc.getElementsByTagName("Language").item(0).text = strLanguage
LogInfo "UpdateInstallConfig: " & "Changing Languange to " & Session.Property("INSTALL_LANGUAGE")
xmlDoc.getElementsByTagName("CompanyName").item(0).text = strCompanyName
LogInfo "UpdateInstallConfig: " & "Changing COMPANYNAME to " & Session.Property("COMPANYNAME")
xmlDoc.getElementsByTagName("ProductId").item(0).text = strProductID
LogInfo "UpdateInstallConfig: " & "Changing PRODUCT_ID to " & Session.Property("PRODUCT_ID")
If xmlDoc.save (strFileName) Then
LogInfo "UpdateInstallConfig: " & "Config file saved successfully."
Else
Set xPE = xmlDoc.parseError
With xPE
strErrText = "Your XML Document failed to load " & _
"due the following error." & vbCrLf & _
"Error #: " & .errorCode & ": " & xPE.reason & _
"Line #: " & .Line & vbCrLf & _
"Line Position: " & .linepos & vbCrLf & _
"Position In File: " & .filepos & vbCrLf & _
"Source Text: " & .srcText & vbCrLf & _
"Document URL: " & .url
LogInfo "UpdateInstallConfig: " & strErrText
End With
End If
Else
LogInfo "UpdateInstallConfig: " & "Loading of install.config file failed."
Set xPE = xmlDoc.parseError
With xPE
strErrText = "Your XML Document failed to load " & _
"due the following error." & vbCrLf & _
"Error #: " & .errorCode & ": " & xPE.reason & _
"Line #: " & .Line & vbCrLf & _
"Line Position: " & .linepos & vbCrLf & _
"Position In File: " & .filepos & vbCrLf & _
"Source Text: " & .srcText & vbCrLf & _
"Document URL: " & .url
LogInfo "UpdateInstallConfig: " & strErrText
End With
End If
Else
LogInfo "UpdateInstallConfig: " & "Could not find install.config file."
End If
Function LogInfo(msg)
Dim rec
Set rec = Session.Installer.CreateRecord(1)
rec.StringData(0) = msg
LogInfo = Session.Message(&H04000000, rec)
End Function
This is preceded by Custom Action "InstallConfigData" that is an Immediate Action scheduled to run in Install Exec Sequence After Cost Initialize.
Dim strBucket
strBucket = Session.Property("INSTALL_LANGUAGE")
strBucket = strBucket & "||"
strBucket = strBucket & Session.Property("COMPANYNAME")
strBucket = strBucket & "||"
strBucket = strBucket & Session.Property("PRODUCT_ID")
Session.Property("UpdateInstallConfig") = strBucket
I am very new to InstallShield, and MSI's in general - so any and all help would be very much appreciated.
BTW - The purpose of the CAs is allow the user to change the Product ID and Company Name after install. These values are stored in an XML file which lives in our "ProductName\Client" directory that by default is installed to Program Files. Using an Immediate Action to edit and save the XML file fails (at the save) when the user launched the installer from Add/Remove Programs (Change button). I think is due to the CA not have the correct permissions to change the file when executed in this manner.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 04, 2011
03:10 AM
The settings looks right. You may want to open the .msi file with Orca.exe or IS IDE and run "Full MSI Validation Suite" and see if there is any obvious ICE errors.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 04, 2011
07:45 AM
Used Orca to perform a Full MSI Validation Suite. Only 59 errors, 4480 warnings. Nothing however specifically pointing to the CA in question. Though that scan did let me know that I have other issues to work through as well.