Write the custom action to call caspol directly? Write a C++ DLL to perform
whatever task caspol is doing for you? Relying on a batch file is pretty
flaky, and for best results custom actions should have as few dependencies
as possible.

 

CasPol with the -af option ultimately calls
System.Security.Policy.PolicyLevel.AddFullTrustAssembly, which is obsolete
as of .NET 2.0 (I did some digging in Reflector). If you're targetting .NET
1.1 or earlier then the configuration edited by this routine actually does
something; otherwise you're supposed to put the assemblies in the GAC.

 

In turn the policy is ultimately stored in the security.config file, but the
schema for this is not officially documented and you are supposed to use
either caspol.exe or the security policy configuration console.

 

-- 

Mike Dimmick

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 22 January 2008 20:20
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Giving fulltrust in deferred Custom action

 

Hi,
We need to give full trust to our assemblies at the installation time. We
have a batch file embedded in the MSI DB which is extracted at the runtime
and runs caspol to full trust our assemblies (machine level). This process
works fine when run as an immediate custom action but fails to run if I
change it to the deferred mode (required for Vista). Reason of failure is
MSIGetActiveDatabase which doesn?t return db handle inside deferred custom
action so file can?t be extracted.

 

Any help?

 

Regards
Sandeep

 

  _____  

Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
<http://us.rd.yahoo..com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62sR8
HDtDypao8Wcj9tAcJ%20>  it now.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to