Home All Groups Group Topic Archive Search About

Trusting a .NET 1.1 assembly from the command line (ie: batch scri

Author
28 Dec 2006 4:38 PM
Evan K
We have a .NET 1.1 application written by a colleague of mine (who is no
longer employed here).  It is sitting on a network share, and to run it on a
computer, we need to trust the assembly on each computer by doing the
following:

Control Panel > Administrative Tools > Microsoft .NET Framework 1.1
Configuration  > Manage The Assembly Cache > Add an Assembly to the Assembly
Cache

I'm trying to automate this in a batch script, but am confused as to the
command-line equivalent.  I know the application needs to be signed with a
strong name (downloading the corresponding .NET SDK as I type this), but what
do I do after it is signed?  What command(s) do I need to run, and what (if
any) registry keys would I have to manually enter?

Author
2 Jan 2007 12:55 AM
Nicole Calinoiu
You can use caspol.exe
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfCodeAccessSecurityPolicyUtilityCaspolexe.asp)
to modify CAS policy from the command line.  If you want to deploy a uniform
CAS policy across your entire network, another option to consider might be
deploying an MSI package as described at
http://support.microsoft.com/kb/815173.



Show quoteHide quote
"Evan K" <Evan K@discussions.microsoft.com> wrote in message
news:40959ED0-617E-4B90-A25E-107A1C3E6801@microsoft.com...
> We have a .NET 1.1 application written by a colleague of mine (who is no
> longer employed here).  It is sitting on a network share, and to run it on
> a
> computer, we need to trust the assembly on each computer by doing the
> following:
>
> Control Panel > Administrative Tools > Microsoft .NET Framework 1.1
> Configuration  > Manage The Assembly Cache > Add an Assembly to the
> Assembly
> Cache
>
> I'm trying to automate this in a batch script, but am confused as to the
> command-line equivalent.  I know the application needs to be signed with a
> strong name (downloading the corresponding .NET SDK as I type this), but
> what
> do I do after it is signed?  What command(s) do I need to run, and what
> (if
> any) registry keys would I have to manually enter?