Page 1 of 1

Setting .NET Code Access Policy

Posted: Tue Jul 01, 2008 6:40 pm
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.

Posted: Wed Jul 02, 2008 8:19 pm
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.