Thanks for the explanation that makes sense, from this I guess there is no way 
to detect that you have scheduled something after an action that is not 
included. I'll raise a bug with this text so it is not lost. I guess it could 
also happen with any event.
 
It was fairly easy to detect in the log, I only had the problem because cut and 
pasted code from another project.
 
Neil
 
Neil Sleightholm
X2 Systems Limited
n...@x2systems.com <mailto:n...@x2systems.com> 
 

________________________________

From: Blair [mailto:os...@live.com]
Sent: Wed 08/12/2010 05:37
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Scheduling includes invalid actions



Currently it is by design that any action you reference using Before or
After when scheduling any other action creates a reference to that
referenced action, which will cause that action's fragment to be included.
This is required since it is the linker that assigns numbers to the
sequences of actions that use positions relative to other actions to
position themselves in the sequence tables.

The fragment in WixUtilExtension containing SchedSecureObjects schedules
both SchedSecureObjects and SchedSecureObjectsRollback.
SchedSecureObjectsRollback is by default scheduled to run after
UnpublishFeatures (but you can change that if you wish, along with its
condition), while SchedSecureObjects is similarly scheduled after
InstallServices. Since UnpublishFeatures comes long before InstallServices,
of course SchedSecureObjectsRollback would run first.

That fragment does not include an <EnsureTable Id="SecureObjects"/> element,
which would have been good defensive programming, most likely because it
assumes that the only reference to the fragment would come from the compiler
extension located in the extension itself, not from someone "reaching into"
the extension the way you did.

In both custom actions, if the table is empty, it appears (based on a
cursory glance at the code) that the ca will not fail, meaning that a
workaround for you would be to include the EnsureTable element I mention
above in the same fragment you schedule some action after
SchedSecureObjects.

If you didn't have WixUtilExtension referenced by light.exe, the
SchedSecureObjects action would not have been found and you would have
received a linker error (it can't schedule something after something it
doesn't know about).

Remove the reference to the extension and you should see the code fail to
link. I don't think you have a showstopper error here, although as I say in
the future it may be worth adding EnsureTable elements to each fragment
where custom actions are scheduled via extension-embedded wixlibs.

Blair

-----Original Message-----
From: Neil Sleightholm [mailto:n...@x2systems.com]
Sent: Tuesday, December 07, 2010 2:05 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Scheduling includes invalid actions

This is what the log looks like:

Action ended 21:55:50: ProcessComponents. Return value 1.
Action start 21:55:50: UnpublishFeatures. MSI (s) (DC:28)
[21:55:50:121]: Doing action: SchedSecureObjectsRollback
Action ended 21:55:50: UnpublishFeatures. Return value 1.
MSI (s) (DC:B8) [21:55:50:154]: Invoking remote custom action. DLL:
C:\Windows\Installer\MSI7E6F.tmp, Entrypoint: SchedSecureObjectsRollback
MSI (s) (DC:B4) [21:55:50:155]: Generating random cookie.
MSI (s) (DC:B4) [21:55:50:162]: Created Custom Action Server with PID
8564 (0x2174).
MSI (s) (DC:40) [21:55:50:345]: Running as a service.
MSI (s) (DC:40) [21:55:50:347]: Hello, I'm your 32bit Impersonated
custom action server.
MSI (s) (DC!D0) [21:55:50:377]: Note: 1: 2205 2:  3: SecureObjects
MSI (s) (DC!D0) [21:55:50:377]: Note: 1: 2228 2:  3: SecureObjects 4:
SELECT `SecureObjects`.`SecureObject`, `SecureObjects`.`Table`,
`SecureObjects`.`Domain`, `SecureObjects`.`User`,
`SecureObjects`.`Permission`, `SecureObjects`.`Component_`,
`Component`.`Attributes` FROM `SecureObjects`,`Component` WHERE
`SecureObjects`.`Component_`=`Component`.`Component`
Action start 21:55:50: SchedSecureObjectsRollback.
SchedSecureObjectsRollback:  Error 0x8007064f: failed to open view on
database
SchedSecureObjectsRollback:  Error 0x8007064f: failed to open view on
SecureObjects table
CustomAction SchedSecureObjectsRollback returned actual error code 1603
(note this may not be 100% accurate if translation happened inside
sandbox)
MSI (s) (DC:28) [21:55:50:380]: Machine policy value 'DisableRollback'
is 0
MSI (s) (DC:28) [21:55:50:380]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\R
ollback\Scripts 3: 2
Action ended 21:55:50: SchedSecureObjectsRollback. Return value 3.

I am not sure why it is doing SchedSecureObjectsRollback as it hasn't
failed up to that point. There isn't a SecureObjects table in the MSI
but SchedSecureObjects is in InstallExecuteSequence at sequence 5801
with the condition "NOT REMOVE~="ALL" AND VersionNT > 400".

It doesn't surprise me that is failed because SchedSecureObjects is not
present but I think it should have generated an error in candle or
light.

I have a simple repro if you would like me to raise a bug and attach it.

Neil


-----Original Message-----
From: Rob Mensching [mailto:r...@robmensching.com]
Sent: 07 December 2010 19:12
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Scheduling includes invalid actions

Can you be more specific about what failed? Log file snippet would be
ideal.

On Mon, Dec 6, 2010 at 5:25 AM, Neil Sleightholm <n...@x2systems.com>
wrote:

> I scheduled a custom action after SchedSecureObjects but I didn't
> actually have the SecureObjects table in my code. The code compiled ok

> but it added the SchedSecureObjects action to the
> InstallExecuteSequence. When I ran the install SchedSecureObjects
> tried to run but failed because SecureObjects didn't exist.
>
>
>
> Is this a bug in WiX? Should there have been a warning that I had
> schedule a custom action after something that didn't exist?
>
>
>
> Neil
>
>
>
> Neil Sleightholm
> X2 Systems Limited
> n...@x2systems.com <mailto:n...@x2systems.com>
>
>
>
>
> ----------------------------------------------------------------------
> -------- What happens now with your Lotus Notes apps - do you make
> another costly upgrade, or settle for being marooned without product
> support? Time to move off Lotus Notes and onto the cloud with
> Force.com, apps are easier to build, use, and manage than apps on
> traditional platforms. Sign up for the Lotus Notes Migration Kit to
> learn more. http://p.sf.net/sfu/salesforce-d2d
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


--
virtually, Rob Mensching - http://RobMensching.com <http://robmensching.com/>  
LLC
------------------------------------------------------------------------
------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to
move off Lotus Notes and onto the cloud with Force.com, apps are easier
to build, use, and manage than apps on traditional platforms. Sign up
for the Lotus Notes Migration Kit to learn more.
http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to