Setting up Policies to run Exe file from network drive

A

Alex

Hi,

I'm having a booger of a time trying to understand the policies for VB 2005
so I can run the EXE file from a network share via mapped drive.

My first route was to use the Global Assembly Cache, but I never could get
VB2005 to create the DLL per ArticleID 315682. I ran sn -k
"C:\GAC\TestKey.snk" then added the following to the AssemblyInfo.vb of my
Project:
<Assembly: AssemblyKeyFile("C:\GAC\TestKey.snk")>

Then when I go into my project and build it, no DLL is ever created.

Can someone give me some pointers on how to create the DLL the article
describes?

Thanks ---

Alex
 
C

cfps.Christian

Hi,

I'm having a booger of a time trying to understand the policies for VB 2005
so I can run the EXE file from a network share via mapped drive.

My first route was to use the Global Assembly Cache, but I never could get
VB2005 to create the DLL per ArticleID 315682. I ran sn -k
"C:\GAC\TestKey.snk" then added the following to the AssemblyInfo.vb of my
Project:
<Assembly: AssemblyKeyFile("C:\GAC\TestKey.snk")>

Then when I go into my project and build it, no DLL is ever created.

Can someone give me some pointers on how to create the DLL the article
describes?

Thanks ---

Alex

Not sure what your exact problem is since you're talking mostly about
dlls in the post but want to know how to run an exe from the
network...

Anyway I believe your answer is to use caspol.
This site gives a good explanation on how to use it:
http://weblogs.asp.net/rmclaws/archive/2007/03/22/work-with-net-projects-from-a-network-share.aspx
 
A

Alex

cfps.Christian said:
Not sure what your exact problem is since you're talking mostly about
dlls in the post but want to know how to run an exe from the
network...

Anyway I believe your answer is to use caspol.
This site gives a good explanation on how to use it:
http://weblogs.asp.net/rmclaws/archive/2007/03/22/work-with-net-projects-from-a-network-share.aspx

Hi,

The end result I'm trying to get to is building my application and storing
the EXE on a network share for end users to run, as opposed to copying it to
their desktop. Problem is .Net Framework policies won't allow this by
default. Below are the steps I went through per
http://support.microsoft.com/kb/315682 :
- Created my VB2005 Application
- Ran the following to create my key:
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe -k
C:\GAC\TestKey.snk
- Added the following to the AssemblyInfo.vb file for the project:
AssemblyKeyFile("C:\GAC\TestKey.snk ")>
- Built the program and no DLL is created

The issue is I need the DLL so I can copy it to the client and run the
following to add the GAC to the workstation so it will run the EXE once
copied to the network:
gacutil -I "C:\whatever.dll"

It's my understanding per Article ID 315682 that this is how it works, but I
will review the link you sent and see if that does the trick.

Thanks and take care ...

Alex
 
P

Phill W.

Alex said:
I'm having a booger of a time trying to understand the policies for VB 2005
so I can run the EXE file from a network share via mapped drive.
My first route was to use the Global Assembly Cache

The Global Assembly Cache is local to the client PC; it's not what you
want.

What you need is CASPOL.exe, which ships with each Framework. From a
..Net command prompt and all on a single line, enter:

caspol.exe
-q
-ag 1.2
-url file://Server/Share/path/*
FullTrust
-name "Logical Name"

Replace "Server/Share/path" with the path to your application.
Replace "Logical Name" with a descriptive name (it only appears within
the Policies tools).

Your applications require no additional "preparation" with this in
place. Just bung the compiled exe into that directory on the server and
run it from the client.

Unfortunately, you have to do this (somehow) on each and every client.

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top