Flexera Software Community  

Go Back   Flexera Software Community > Products > InstallShield > InstallShield Windows 12
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-17-2006, 09:37 AM
lysemose lysemose is offline
Power User (30+ Posts)
 
Join Date: Aug 2002
Location: Denmark
Posts: 91
Deferred CA reads blank CustomActionData

I am trying to update deferred CA's in IS11.5 before upgrading to IS12.
I set the CustomActionData in an immediate CA after InstallInitialiaze in the execute sequence. When the deferred CA is executed, I can find the CustomActionData in the log, but reading the CustomActionData from the deferred CA returns a blank (see below).

Can somebody give me some advise how to solve the problem ?

+++++++++ log ++++++++++++++++++++++++++++++++
MSI (s) (EC4) [16:58:00:221]: Executing op: CustomActionSchedule(Action=SetupSecurity,ActionType=1025,Source=BinaryData,Target=f7,CustomActionData=MSSQL$PDM|SQLAgent$PDM)
MSI (s) (EC:84) [16:58:00:231]: Invoking remote custom action. DLL: C:\WINNT\Installer\MSI413.tmp, Entrypoint: f7
1: CustomActionData =

+++++++++ installscript deferred CA +++++++++++++++++

function ScriptSetupSecurity(hMSI)
LIST listID;
STRING szCustomActionData, SQLService, SQLAgentService;
NUMBER nLen;
begin
MsiGetProperty( hMSI, "CustomActionData", szCustomActionData, nLen);
SprintfMsiLog ( "CustomActionData = " + szCustomActionData);
listID = ListCreate(STRINGLIST);
StrGetTokens( listID, szCustomActionData, "|" );
ListGetFirstString( listID, SQLService);
ListGetNextString( listID, SQLAgentService);
ListDestroy ( listID);
Reply With Quote
  #2  
Old 08-17-2006, 09:52 AM
Christopher Painter's Avatar
Christopher Painter Christopher Painter is offline
Uber User (1000+ Posts)
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 4,044
The techniques described for use with InstallShield 12 are not compatible with previous versions of InstallShield. This is because previous versions use a DCOM/ROT singleton object to access the MSI handle from the client side msiexec not the server side msiexec that the custom action is running in.

For an example, populate the Property table with CustomActionData = Hello

You will see in your logfile the server side passing the CustomActionData to the property but then you will see the original data from the property table appear in your MsiGetProperty.

If you replace the InstallScript with VBScript you will see the correct data since session.property uses the correct MSI handle.

This is why InstallShield 12 is such a big deal in getting InstallScript to be truely MSI compliant.
__________________
Christopher Painter, Industry Leading Expert in:
Windows Installer, InstallShield, C#, DTF, TFS, WiX and IsWiX
Visit DeploymentEngineering.com for more information on products and services offered
Reply With Quote
  #3  
Old 08-17-2006, 09:59 AM
lysemose lysemose is offline
Power User (30+ Posts)
 
Join Date: Aug 2002
Location: Denmark
Posts: 91
Thanks for your prompt responese.

Do I understand you correct that it will work when upgraded to IS12 ?
Reply With Quote
  #4  
Old 08-17-2006, 10:01 AM
Christopher Painter's Avatar
Christopher Painter Christopher Painter is offline
Uber User (1000+ Posts)
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 4,044
Yes it will. You might also want to look at my blog for more information and a link to InstallSite for a simple InstallScript function that deserializes CustomActionData attributes.
__________________
Christopher Painter, Industry Leading Expert in:
Windows Installer, InstallShield, C#, DTF, TFS, WiX and IsWiX
Visit DeploymentEngineering.com for more information on products and services offered
Reply With Quote
  #5  
Old 08-17-2006, 10:07 AM
lysemose lysemose is offline
Power User (30+ Posts)
 
Join Date: Aug 2002
Location: Denmark
Posts: 91
That's good news - I will try it out as the first thing tomorrow morning.

Thanks for your advice, Svend
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 05:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 2010 Flexera Software Inc. All rights reserved.