Thanks Mike,

Do you have any idea which Windows APIs are called by caspol to grant full 
trust to a public key or should I call managed APIs ?

Regards
Sandeep

----- Original Message ----
From: Mike Dimmick <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; wix-users@lists.sourceforge.net
Sent: Wednesday, January 23, 2008 3:19:26 AM
Subject: RE: [WiX-users] Giving fulltrust in deferred Custom action





 
 

 


<!--
 _filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
 _filtered {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times 
New Roman";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;text-decoration:underline;}
span.EmailStyle17
        
{font-family:Verdana;color:blue;font-weight:normal;font-style:normal;text-decoration:none
 none;}
 _filtered {margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {}
-->






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
it now.
 










      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
-------------------------------------------------------------------------
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