Hi
Thanks for your answer. From how i interpret the log file the action returns
success (even if there is an exception), which is no surprise as I return this
result via C#. Here are the relevant parts from the log:
******************** TestCA.SetProperty ****************3
MSI (s) (54:54) [08:30:11:796]: Doing action: TestCA.SetProperty
MSI (s) (54:54) [08:30:11:796]: Note: 1: 2205 2: 3: ActionText
Action 08:30:11: TestCA.SetProperty.
Action start 08:30:11: TestCA.SetProperty.
MSI (s) (54:54) [08:30:11:796]: PROPERTY CHANGE: Adding TestCAproperty. Its
value is
'SourceDir=;INSTALLDIR=C:\Programme\CalibrateEN\;AppDataFolder=C:\Dokumente und
Einstellungen\Administrator\Anwendungsdaten\'.
Action ended 08:30:11: TestCA.SetProperty. Return value 1.
MSI (s) (54:54) [08:30:11:811]: Doing action: TestCA
MSI (s) (54:54) [08:30:11:811]: Note: 1: 2205 2: 3: ActionText
Action 08:30:11: TestCA.
Action start 08:30:11: TestCA.
MSI (s) (54:54) [08:30:11:827]: Note: 1: 2205 2: 3: MsiPatchCertificate
MSI (s) (54:54) [08:30:11:827]: LUA patching is disabled: missing
MsiPatchCertificate table
MSI (s) (54:54) [08:30:11:827]: Resolving source.
MSI (s) (54:54) [08:30:11:842]: Resolving source to launched-from source.
MSI (s) (54:54) [08:30:11:842]: Setting launched-from source as last-used.
MSI (s) (54:54) [08:30:11:842]: PROPERTY CHANGE: Adding SourceDir property. Its
value is 'C:\Dokumente und Einstellungen\Administrator\Desktop\'.
MSI (s) (54:54) [08:30:11:842]: PROPERTY CHANGE: Adding SOURCEDIR property. Its
value is 'C:\Dokumente und Einstellungen\Administrator\Desktop\'.
MSI (s) (54:54) [08:30:11:842]: PROPERTY CHANGE: Adding SourcedirProduct
property. Its value is '{2500B11A-2907-4721-97D2-1AD7A639A3C3}'.
MSI (s) (54:54) [08:30:11:842]: SOURCEDIR ==> C:\Dokumente und
Einstellungen\Administrator\Desktop\
MSI (s) (54:54) [08:30:11:842]: SOURCEDIR product ==>
{2500B11A-2907-4721-97D2-1AD7A639A3C3}
MSI (s) (54:54) [08:30:11:842]: Determining source type
MSI (s) (54:54) [08:30:11:842]: Source type from package 'Installer.msi': 2
MSI (s) (54:54) [08:30:11:842]: Source path resolution complete. Dumping
Directory table...
MSI (s) (54:54) [08:30:11:842]: Dir (source): Key: TARGETDIR , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath: ,
ShortSubPath:
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: WindowsFolder , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath: ,
ShortSubPath:
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: DesktopFolder , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath: ,
ShortSubPath:
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: AppDataFolder , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath: ,
ShortSubPath:
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: ProgramMenuFolder , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath: ,
ShortSubPath:
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: StartupFolder , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath: ,
ShortSubPath:
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: ApplicationProgramsFolder ,
Object: C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath:
Kistler Instruments AG (NOT LOCALIZED)\ , ShortSubPath: 9mauhji3\
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: ProgramFilesFolder , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath: ,
ShortSubPath:
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: INSTALLDIR , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath:
CalibrateEN\ , ShortSubPath: hqfkzea3\
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: PrintProcessDir , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath:
CalibrateEN\PrintProcess\ , ShortSubPath: hqfkzea3\ny2gcnro\
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: dir_Release_Kdi_1 , Object:
C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath:
CalibrateEN\Kdi\ , ShortSubPath: hqfkzea3\Kdi\
MSI (s) (54:54) [08:30:11:858]: Dir (source): Key: dir_Release_Plugin_2 ,
Object: C:\Dokumente und Einstellungen\Administrator\Desktop\ , LongSubPath:
CalibrateEN\Plugin\ , ShortSubPath: hqfkzea3\Plugin\
MSI (s) (54:54) [08:30:11:858]: Note: 1: 2205 2: 3: ActionText
MSI (s) (54:54) [08:30:11:874]: Note: 1: 2205 2: 3: ActionText
MSI (s) (54:54) [08:30:11:874]: Note: 1: 2205 2: 3: ActionText
Action 08:30:11: GenerateScript. Generating script operations for action:
GenerateScript: TestCA
Action ended 08:30:11: TestCA. Return value 1.
MSI (s) (54:54) [08:30:11:889]: Doing action: ProcessComponents
MSI (s) (54:54) [08:30:11:889]: Note: 1: 2205 2: 3: ActionText
Action 08:30:11: ProcessComponents. Updating component registration
Action start 08:30:11: ProcessComponents.
ProcessComponents:
******************** MORE (deferred) *****************************
MSI (s) (54:54) [08:30:12:327]: Executing op:
ActionStart(Name=CopyChangingFilesAction,,)
Action 08:30:12: TestCA.
MSI (s) (54:54) [08:30:12:327]: Executing op:
CustomActionSchedule(Action=TestCA,ActionType=3073,Source=BinaryData,Target=CopyChangingDirectories,CustomActionData=SourceDir=;INSTALLDIR=C:\Programme\CalibrateEN\;AppDataFolder=C:\Dokumente
und Einstellungen\Administrator\Anwendungsdaten\)
MSI (s) (54:54) [08:30:12:327]: Creating MSIHANDLE (5) of type 790536 for
thread 2900
MSI (s) (54:80) [08:30:12:342]: Invoking remote custom action. DLL:
C:\WINDOWS\Installer\MSI67.tmp, Entrypoint: TestCA
MSI (s) (54:48) [08:30:12:342]: Generating random cookie.
MSI (s) (54:48) [08:30:12:358]: Created Custom Action Server with PID 2816
(0xB00).
MSI (s) (54:10) [08:30:12:405]: Running as a service.
MSI (s) (54:7C) [08:30:12:405]: Hello, I'm your 32bit Elevated custom action
server.
MSI (s) (54!B4) [08:30:12:577]: Creating MSIHANDLE (6) of type 790531 for
thread 180
SFXCA: Extracting custom action to temporary directory:
C:\WINDOWS\Installer\MSI67.tmp-\
MSI (s) (54!B4) [08:30:12:577]: Closing MSIHANDLE (6) of type 790531 for thread
180
MSI (s) (54!B4) [08:30:12:592]: Creating MSIHANDLE (7) of type 790531 for
thread 180
SFXCA: Binding to CLR version v2.0.50727
MSI (s) (54!B4) [08:30:12:592]: Closing MSIHANDLE (7) of type 790531 for thread
180
MSI (s) (54!B4) [08:30:12:780]: Creating MSIHANDLE (8) of type 790531 for
thread 180
Calling custom action CustomAction!CustomAction.CustomActions.TestCA
MSI (s) (54!B4) [08:30:12:796]: Closing MSIHANDLE (8) of type 790531 for thread
180
MSI (s) (54!B4) [08:30:12:842]: Creating MSIHANDLE (9) of type 790531 for
thread 180
CustomAction TestCAcalled!
MSI (s) (54!B4) [08:30:12:842]: Closing MSIHANDLE (9) of type 790531 for thread
180
MSI (s) (54!B4) [08:30:17:092]: Creating MSIHANDLE (10) of type 790531 for
thread 180
MSI (s) (54!B4) [08:30:17:092]: Closing MSIHANDLE (10) of type 790531 for
thread 180
MSI (s) (54!B4) [08:30:17:108]: Creating MSIHANDLE (11) of type 790531 for
thread 180
MSI (s) (54!B4) [08:30:17:108]: Closing MSIHANDLE (11) of type 790531 for
thread 180
MSI (s) (54!B4) [08:30:17:108]: Creating MSIHANDLE (12) of type 790531 for
thread 180
MSI (s) (54!B4) [08:30:17:108]: Closing MSIHANDLE (12) of type 790531 for
thread 180
MSI (s) (54!B4) [08:30:17:124]: Creating MSIHANDLE (13) of type 790531 for
thread 180
MSI (s) (54!B4) [08:30:17:124]: Closing MSIHANDLE (13) of type 790531 for
thread 180
MSI (s) (54:80) [08:30:17:139]: Closing MSIHANDLE (5) of type 790536 for thread
2900
MSI (s) (54:54) [08:30:17:155]: Executing op:
ActionStart(Name=ProcessComponents,Description=Updating component registration,)
Action 08:30:17: ProcessComponents. Updating component registration
________________________________________
Von: Blair [[email protected]]
Gesendet: Dienstag, 13. Juli 2010 18:34
An: 'General discussion for Windows Installer XML toolset.'
Betreff: Re: [WiX-users] Accessing Source directory in Deferred Custom Action
(ApDataFolder etc. is working, just not SourceDir)
In a verbose installation log, what is the resulting value of the TestCA
property?
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, July 13, 2010 8:24 AM
To: [email protected]
Subject: [WiX-users] Accessing Source directory in Deferred Custom Action
(ApDataFolder etc. is working, just not SourceDir)
Hi
I would like to access the "SourceDir" property in a deferred custom action.
While i can access other directories via the CustomAction property (see
example below). The SourceDir ActionData remains empty. I must be doing
something wrong. I sure it's something silly, that only a wix newby can
stumble over.
Any help appreciated.
Thanks
My sample code:
<InstallExecuteSequence>
<Custom Action="TestCA.SetProperty" After="InstallInitialize"/>
<Custom Action="TestCA" After="TestCA.SetProperty"/>
</InstallExecuteSequence>
<CustomAction Id="TestCA.SetProperty" Return="check"
Property="TestCA"
Value="SourceDir=[SourceDir];INSTALLDIR=[INSTALLDIR];AppDataFolder=[AppDataF
older]">
</CustomAction>
<CustomAction Id="TestCA" BinaryKey="CustomActionDll" DllEntry="TestMethod"
Impersonate="no" Execute="deferred" Return="check">
</CustomAction>
In the C# code:
[CustomAction]
public static ActionResult TestMethod(Session session)
{
session.Log("CustomAction TestMethod called!");
.
try{
// empty
string showMe = session.CustomActionData["SourceDir"];
// working, path
string showMe = session.CustomActionData["AppDataFolder"];
----------------------------------------------------------------------------
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users