Setting .NET Code Access Policy

Got a problem you cannot solve? Try here.
Post Reply
damian34
Posts: 2
Joined: Tue Jul 01, 2008 6:31 pm

Setting .NET Code Access Policy

Post by damian34 »

Howdy,

Just wondering if anyone has managed to use InstallAware to install a .net CAS policy as required by Microsoft Office addins to function properly?

I used to use the SetSecurity Windows Installer class method in MSI installers but it requires to pass parameters to the Install and Remove function which I believe you can't do with InstallAware?

I could hardcode an installer class to perform the required actions but would prefer not to. Ideally I would like a way to register the CAS policy from MSI code.

The only other solution I can see is to develop a plugin DLL which does what the SetSecurity .NET class does, but being it would be in C++ it makes the required code a bit more complex.
damian34
Posts: 2
Joined: Tue Jul 01, 2008 6:31 pm

Post by damian34 »

Wrote a DLL to do what SetSecurity.cs does - call caspol.exe and used the Call DLL function plugin. Hopefully there wasn't an easier way.
Post Reply