So reschedule the SetProperty CA to be before InstallFinalize.
<InstallExecuteSequence>
<Custom
Action="CreateSQLServerDatabaseWithImpersonationLoggedInUser.SetProperty
"
Before="CreateSQLServerDatabaseWithImpersonationLoggedInUser.SetProperty
">Not Installed</Custom>
<Custom Action
="CreateSQLServerDatabaseWithImpersonationLoggedInUser" Before
="InstallFinalize">Not Installed</Custom>
-----Original Message-----
From: Robert Hermann [mailto:[email protected]]
Sent: Thursday, December 08, 2011 9:44 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Need some help on Deferred Custom Actions
I got a couple of custom actions that I need to run elevated so I've got
them setup as deferred. I understand these run on a thread outside the
execution of the main installer session so I've setup my installe/custom
actions to use the CustomActionData property.
Some detail on one of the custom actions:
CreateSQLServerDatabaseWithImpersonationLoggedInUser changes the
computer
(creates some things), so It needs elevated priviledges. I need it to
have access to the session variable [CommonHTSServer].
According to everything I read... here is my script:
<CustomAction
Id="CreateSQLServerDatabaseWithImpersonationLoggedInUser.SetProperty"
Return ="check" Property
="CreateSQLServerDatabaseWithImpersonationLoggedInUser" Value
="[CommonHTSServer]" />
<CustomAction Id="CreateSQLServerDatabaseWithImpersonationLoggedInUser"
BinaryKey="SqlServerCustomAction"
DllEntry="CreateSQLServerDatabaseImpersonationLoggedInDomainUser"
Execute="deferred" Impersonate ="no"/>
<InstallExecuteSequence>
<Custom
Action="CreateSQLServerDatabaseWithImpersonationLoggedInUser.SetProperty
" After ="InstallFinalize">Not Installed</Custom>
<Custom Action
="CreateSQLServerDatabaseWithImpersonationLoggedInUser" After
="CreateSQLServerDatabaseWithImpersonationLoggedInUser.SetProperty">Not
Installed</Custom>
<Custom Action ="CreateHTSServiceConfig" Sequence="1603">Not
Installed</Custom>
<Custom Action ="ConfigureNonAdministratorUserToUseWCFServices"
Sequence="1604">Not Installed</Custom>
<Custom Action ="RemoveSSLAndWCFAssignmentsAndHTSLicense"
Sequence="1599">Installed</Custom>
<Custom Action ="Delete_HTSLogFiles_CleanupTask"
Sequence="1601">Installed</Custom>
</InstallExecuteSequence>
I get the compile error :
Error 30 ICE77:
CreateSQLServerDatabaseWithImpersonationLoggedInUser is a in-script
custom action. It must be sequenced in between the InstallInitialize
action and the InstallFinalize action in the InstallExecuteSequence
table
Thanks !
Rob
------------------------------------------------------------------------
------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and
point of
discussion for anyone considering optimizing the pricing and packaging
model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users