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: CA: Installer.CreateRecord not working
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
‎Dec 22, 2011
10:50 AM
CA: Installer.CreateRecord not working
I have a CA that I have been using for years with Wise. I recently converted to Installshield 12. Now the CA does not work.
Basically the CA calls Installer.CreateRecord to format the record to grab the file path. This file path is then used to check for the file's existence and eventually the file is deleted.
Set oRec = Installer.CreateRecord(0)
oRec.StringData(0) = "[#FileName.mdb]"
Session.FormatRecord(oRec)
If fso.FileExists(Session.FormatRecord(oRec)) Then fso.DeleteFile(Session.FormatRecord(oRec))
Placing msgbox after Session.FormatRecord shows that it was not formatted.
Also, is Session. allways needed when calling a Seaaion Object? In Wise it is not.
Basically the CA calls Installer.CreateRecord to format the record to grab the file path. This file path is then used to check for the file's existence and eventually the file is deleted.
Set oRec = Installer.CreateRecord(0)
oRec.StringData(0) = "[#FileName.mdb]"
Session.FormatRecord(oRec)
If fso.FileExists(Session.FormatRecord(oRec)) Then fso.DeleteFile(Session.FormatRecord(oRec))
Placing msgbox after Session.FormatRecord shows that it was not formatted.
Also, is Session. allways needed when calling a Seaaion Object? In Wise it is not.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 22, 2011
11:22 AM
As described in the "FormatRecord" and "Formatted" help topics, [#filekey] expressions can come back as null based on where the action is scheduled and the file's component state or action.
Also, what does the MsgBox call look like? Are you displaying oRec.StringData(0), or something else? You could test the MsgBox with FormatRecord and [%env] or some other less-schedule-dependent expression to see if that has anything to do with it.
Putting "Session" before Session objects is optional.
Also, what does the MsgBox call look like? Are you displaying oRec.StringData(0), or something else? You could test the MsgBox with FormatRecord and [%env] or some other less-schedule-dependent expression to see if that has anything to do with it.
Putting "Session" before Session objects is optional.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 22, 2011
12:11 PM
I "assumed" that when importing files into this new project that the file table would be populated with the actual file name not a lower cased value. All the files and subsequently all the Key Files in the Component Table are lower case. Once the "[#FileName.mdb]" was updated with the key value al lwent according to plan.
Is this process able to be changed? I could not find a way within the Settings or Options. I would like my File and Component Tables files' to considt of the actual file name.
Thank you
Is this process able to be changed? I could not find a way within the Settings or Options. I would like my File and Component Tables files' to considt of the actual file name.
Thank you