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: Migrating a Basic MSI project from IS11.5 - CA problem
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
‎Apr 02, 2008
04:43 AM
Migrating a Basic MSI project from IS11.5 - CA problem
Hi,
I have a simple custom action that it was inserted in the Destination Folder dialog as do action when pressing Next button.
function SetLogDir(hMSI)
STRING szValue;
NUMBER nValue;
begin
MsiGetProperty(hMSI,"LOGDIR",szValue, nValue);
if (szValue == "")
then
szValue=INSTALLDIR ^ "\\Log";
MsiSetProperty(hMSI,"LOGDIR",szValue);
MessageBox(szValue,INFORMATION);
endif;
end;
Now in IS2008 in CA View I set for my SetLogDir CA:
In-Script Execution = Deffered Execution
I get error "Error 2762. Cannot write script record. Transaction not started." during installation when this CA should run.
I read that I have to insert my CA in the Installation - Execute Sequence. I inserted it right after InstallInitialize for test but I still get that error.
Where should I insert the CA to run as expected ? (when user press Next in the DestinationFolder dialog).
I have many CA in my projects so if I get this right I might solve all.
Thanks a lot,
Bianca
I have a simple custom action that it was inserted in the Destination Folder dialog as do action when pressing Next button.
function SetLogDir(hMSI)
STRING szValue;
NUMBER nValue;
begin
MsiGetProperty(hMSI,"LOGDIR",szValue, nValue);
if (szValue == "")
then
szValue=INSTALLDIR ^ "\\Log";
MsiSetProperty(hMSI,"LOGDIR",szValue);
MessageBox(szValue,INFORMATION);
endif;
end;
Now in IS2008 in CA View I set for my SetLogDir CA:
In-Script Execution = Deffered Execution
I get error "Error 2762. Cannot write script record. Transaction not started." during installation when this CA should run.
I read that I have to insert my CA in the Installation - Execute Sequence. I inserted it right after InstallInitialize for test but I still get that error.
Where should I insert the CA to run as expected ? (when user press Next in the DestinationFolder dialog).
I have many CA in my projects so if I get this right I might solve all.
Thanks a lot,
Bianca
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 02, 2008
10:17 AM
If you're setting a property or running in the UI sequence (or both), you'll want to use immediate execution. To run the action when the user clicks a button, you can use a DoAction control event that launches your action, instead of putting the action in the sequences.
(As an aside, you'll probably want to set the buffer-size variable nValue to a size large enough to accommodate the value of LOGDIR before calling MsiGetProperty.)
(As an aside, you'll probably want to set the buffer-size variable nValue to a size large enough to accommodate the value of LOGDIR before calling MsiGetProperty.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
04:26 AM
RobertDickau wrote:
If you're setting a property or running in the UI sequence (or both), you'll want to use immediate execution. To run the action when the user clicks a button, you can use a DoAction control event that launches your action, instead of putting the action in the sequences.
(As an aside, you'll probably want to set the buffer-size variable nValue to a size large enough to accommodate the value of LOGDIR before calling MsiGetProperty.)
Fixed.
Thanks a lot.
Bianca