PDA

View Full Version : Register assembly



NewsArchive
08-27-2009, 01:48 AM
I need to register a C# .NET assembly that is being called from a Clarion
app. Is there an easy way to do this in SB, or do I need to find and call
regasm.exe manually?

Thx,
Dave Moyer

NewsArchive
08-27-2009, 01:50 AM
Dave,

> I need to register a C# .NET assembly that is being called from a Clarion
> app. Is there an easy way to do this in SB, or do I need to find and call
> regasm.exe manually?

You have different options to handle this (File Properties -> Advanced
tab -or- "Register File Operation..." script function). See attached
screenshots.

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
08-27-2009, 03:16 AM
Is it also possible to set Code Access Security through Setup Builder 7,
or will we have to find and call Caspol.exe for this?

If the user installs to a network-drive and you register the assembly
for COM interop, you are still running the risk that the user can't run
..Net code from the network drive (standard in XP and Vista) so the COM
component still won't work!

Best regards

Kasper

NewsArchive
08-28-2009, 01:54 AM
Kasper,

> Is it also possible to set Code Access Security through Setup Builder 7,
> or will we have to find and call Caspol.exe for this?
>
> If the user installs to a network-drive and you register the assembly for
> COM interop, you are still running the risk that the user can't run ..Net
> code from the network drive (standard in XP and Vista) so the COM
> component still won't work!

You have to execute caspol.exe via the "Run Program..." or "Run Command
Line..." functions to set Code Access Security.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
08-28-2009, 01:55 AM
Friedrich,

Exactly what I was looking for. Thanks!

Dave Moyer

NewsArchive
09-12-2009, 02:17 AM
OK, thank you for the info, but are there an easy way to find the path
to caspol.exe then (path to .Net framework)?

Best regards

Kasper

NewsArchive
09-12-2009, 02:18 AM
Kasper,

> OK, thank you for the info, but are there an easy way to find the path to
> caspol.exe then (path to .Net framework)?

According to Microsoft, it's located at:

%WINDIR%\Microsoft.Net\Framework\<frameworkversion>

http://msdn.microsoft.com/en-us/library/ms973850.aspx

For example:

%WINDIR%\Microsoft.NET\Framework\v2.0.50727

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
09-12-2009, 02:18 AM
I almost feel silly to keep on asking questions with so obvious answers,
but here goes:

How do I now the <frameworkversion> part of the above path? Can there
ever be other possibilities for .Net 2.0 runtime than "v2.0.50727"?

Best regards

Kasper

NewsArchive
09-12-2009, 02:19 AM
Kasper,

> I almost feel silly to keep on asking questions with so obvious answers,
> but here goes:
>
> How do I now the <frameworkversion> part of the above path? Can there ever
> be other possibilities for .Net 2.0 runtime than "v2.0.50727"?

Microsoft does not give an official answer to this path question.

I would check if %WINDIR%\Microsoft.NET\Framework\v2.0.50727 has CasPol.exe.
If this is not the case, display a warning (or give the user other
instructions).

But I have never seen a system where CasPol.exe was not in \v2.0.50727 (even
Windows 7 64-bit has it located there)

Friedrich