Deferred custom actions can only access the following "properties": CustomActionData, ProductCode, and UserSID, except for commit actions that cannot access ProductCode either.
You could add this: <SetProperty Id="LaunchFile" Value="[INSTALLDIR]" Sequence="execute" Before="LaunchFile"/> and then change your MsiGetProperty calls to retrieve "CustomActionData" instead of INSTALLDIR. . > From: katelyn.th...@guidancesoftware.com > To: wix-users@lists.sourceforge.net > Date: Mon, 19 Jul 2010 16:35:02 -0400 > Subject: Re: [WiX-users] Custom Action not running > > The only access I make into the actual installation session in my custom > action is: > > UINT uiStat = MsiGetProperty(hInstall, _T("INSTALLDIR"), _T(""), &valueBuff); > > And > > uiStat = MsiGetProperty(hInstall, _T("INSTALLDIR"), szValueBuf, &valueBuff); > > Is a deferred action not allowed to access this? > > > > -----Original Message----- > From: Blair [mailto:os...@live.com] > Sent: Monday, July 19, 2010 3:26 PM > To: 'General discussion for Windows Installer XML toolset.' > Subject: Re: [WiX-users] Custom Action not running > > Then your custom action is likely attempting to access things in the > session/database that deferred actions are not allowed to access (tables, > most session properties, etc.). > > If the custom action's inputs are simple session property reads you can try > creating a property called "LaunchFile" (named after your custom action) > that contains all the data your custom action needs before your custom > action is scheduled, and change your custom action to parse the data out of > just the "CustomActionData" property (which will be the name you must use to > access the property named after your custom action). Otherwise, you will > need an initial custom action that is "immediate" that performs all of the > database accesses and creates the property for the deferred action to use. > > -----Original Message----- > From: Thode, Katelyn [mailto:katelyn.th...@guidancesoftware.com] > Sent: Monday, July 19, 2010 11:35 AM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Custom Action not running > > Thanks for the responses. I have set the custom action to the following: > > <Binary Id="loadDriver" SourceFile="MyCustomAction.dll" /> > <CustomAction Id="LaunchFile" > BinaryKey="loadDriver" > DllEntry="wixTab1394" > Impersonate="no" > Execute="deferred"/> > > <InstallExecuteSequence> > <Custom Action="LaunchFile" Before="InstallFinalize">NOT > Installed</Custom> > </InstallExecuteSequence> > > > In Orca, in the CustomAction table, the type is 3073, which indicates that > the custom action runs with no user impersonation at a scheduled point > within the script. When I test the installer on vista, once the > installation process reaches the custom action, it rollsback and the error > dialog appears. Also, when I run the installer in xp, the custom action > doesn't execute as it did with the previous custom action settings. > > > -----Original Message----- > From: Wilson, Phil [mailto:phil.wil...@invensys.com] > Sent: Friday, July 16, 2010 3:48 PM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Custom Action not running > > The underlying issue is likely to be that UAC systems run impersonated > custom actions without elevation, even if you are an administrator. ON XP > your custom action would be running elevated with admin privs, but not on > UAC, and that's why Blair is telling you how to make it elevated. > > Phil Wilson > > -----Original Message----- > From: Blair [mailto:os...@live.com] > Sent: Friday, July 16, 2010 10:28 AM > To: 'General discussion for Windows Installer XML toolset.' > Subject: Re: [WiX-users] Custom Action not running > > For starters, the action must be scheduled between InstallInitialize and > InstallFinalize, and must be marked as Execute="deferred" with Impersonate > set to "no". Of course, at that point, the custom action does not have > direct access to the database or most session properties. > > This smells like "self-registration". The recommendation is to look more > deeply into ways to make your driver registration more "transparent" in > order to use code that has been more deeply tested for upgrades, repairs, > rollbacks, removals, patching, etc. > > -----Original Message----- > From: Thode, Katelyn [mailto:katelyn.th...@guidancesoftware.com] > Sent: Friday, July 16, 2010 8:50 AM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Custom Action not running > > I did look at DifxApp, but for this particular application, I feel it would > be best to use the application launched from the custom action being called > for reasons that I won't go into as they are specific to the particular > application. Is there a way to give the custom action the necessary > privilege to install drivers? > > -----Original Message----- > From: Blair [mailto:os...@live.com] > Sent: Friday, July 16, 2010 10:40 AM > To: 'General discussion for Windows Installer XML toolset.' > Subject: Re: [WiX-users] Custom Action not running > > Not sure what your logging problem would be, but I suspect that your custom > action does not have the necessary privilege to install drivers. > > Have you looked at DifxApp? > > -----Original Message----- > From: Thode, Katelyn [mailto:katelyn.th...@guidancesoftware.com] > Sent: Friday, July 16, 2010 8:17 AM > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] Custom Action not running > > I am in the process of testing my installer on different operating systems. > The installer was created using 32-bit XP. Everything works as expected and > the Custom Action is run. The exit dialog states that the application has > been installed. When I try running the installer on 32-bit Vista, all the > components get installed, but the custom action is not run. In this case, > the exit dialog states that the installation ended prematurely due to an > error. I tried to enable logging, but no log files were created. Any tips > as to how to correctly enable logging or as to what might be causing this > issue? > > The following is my custom action code: > <!-- Install Driver Using Custom Action --> > <Binary Id="loadDriver" SourceFile="MyCustomAction.dll" /> > <CustomAction Id="LaunchFile" > BinaryKey="loadDriver" > DllEntry="wixTab1394" /> > > <InstallExecuteSequence> > <Custom Action="LaunchFile" After="InstallFinalize">NOT > Installed</Custom> > </InstallExecuteSequence> > > This DLL launches a program that installs device drivers. As expected, on > 32-bit XP, the device driver is installed, whereas on Vista the installation > exits before the custom action is run. > > Thanks, > Katelyn > > Note: The information contained in this message may be privileged and > confidential and thus protected from disclosure. If the reader of this > message is not the intended recipient, or an employee or agent responsible > for delivering this message to the intended recipient, you are hereby > notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you have received this > communication in error, please notify us immediately by replying to the > message and deleting it from your computer. Thank you. > > ---------------------------------------------------------------------------- > -- > 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 > WiX-users@lists.sourceforge.net > 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 > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > Note: The information contained in this message may be privileged and > confidential and thus protected from disclosure. If the reader of this > message is not the intended recipient, or an employee or agent responsible > for delivering this message to the intended recipient, you are hereby > notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you have received this > communication in error, please notify us immediately by replying to the > message and deleting it from your computer. Thank you. > > > ---------------------------------------------------------------------------- > -- > 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 > WiX-users@lists.sourceforge.net > 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 > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > *** Confidentiality Notice: This e-mail, including any associated or > attached files, is intended solely for the individual or entity to which it > is addressed. This e-mail is confidential and may well also be legally > privileged. If you have received it in error, you are on notice of its > status. Please notify the sender immediately by reply e-mail and then delete > this message from your system. Please do not copy it or use it for any > purposes, or disclose its contents to any other person. This email comes > from a division of the Invensys Group, owned by Invensys plc, which is a > company registered in England and Wales with its registered office at > Portland House, Bressenden Place, London, SW1E 5BF (Registered number > 166023). For a list of European legal entities within the Invensys Group, > please go to > http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77 > . You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail > inet.hqhelpd...@invensys.com. This e-mail and any attachments thereto may be > subject to the terms of any agreements between Invensys (and/or its > subsidiaries and affiliates) and the recipient (and/or its subsidiaries and > affiliates). > > > > ---------------------------------------------------------------------------- > -- > 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 > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > Note: The information contained in this message may be privileged and > confidential and thus protected from disclosure. If the reader of this > message is not the intended recipient, or an employee or agent responsible > for delivering this message to the intended recipient, you are hereby > notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you have received this > communication in error, please notify us immediately by replying to the > message and deleting it from your computer. Thank you. > > > ---------------------------------------------------------------------------- > -- > 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 > WiX-users@lists.sourceforge.net > 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 > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > Note: The information contained in this message may be privileged and > confidential and thus protected from disclosure. If the reader of this > message is not the intended recipient, or an employee or agent responsible > for delivering this message to the intended recipient, you are hereby > notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you have received this > communication in error, please notify us immediately by replying to the > message and deleting it from your computer. Thank you. > > > ------------------------------------------------------------------------------ > 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 > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 ------------------------------------------------------------------------------ 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 WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users