By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,758 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,758 IT Pros & Developers. It's quick & easy.

Setting up Policies to run Exe file from network drive

P: n/a
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
Nov 26 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Nov 26, 3:13 pm, "Alex" wrote:
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/archi...ork-share.aspx
Nov 26 '07 #2

P: n/a

"cfps.Christian" <ge*******@otc.eduwrote in message
news:d4**********************************@y5g2000h sf.googlegroups.com...
On Nov 26, 3:13 pm, "Alex" wrote:
>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/archi...ork-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
Nov 26 '07 #3

P: n/a
Alex wrote:
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.
Nov 27 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.