473,382 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Setting up Policies to run Exe file from network drive

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
3 3412
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ian | last post by:
I would like to set a path to a schema where both the xml file and the schema are on my local hard drive (e.g. c:\XML\auto.xml and c:\XML\auto.xsd) Thank you, Ian
6
by: moonriver | last post by:
I write a program accessing files in network drive o:. It is doable as a standalone application. However, if it is running under windows service, the following exception will appear: 13/07/2004...
8
by: Lam | last post by:
HI anyone knows how can I open a mapped network file in C#? I try string file = @"T:\file.txt"; it shows me the error: "Could not find a part of the path" but if I copy the file to my C dirve,...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
2
by: .Net Believer | last post by:
I using the routine below to copy file to a network drive for a regular backup process. Before calling this routine I using another function to check the presence of the LAN connection and the...
2
by: createdbyx | last post by:
I am trying to make a file sync utillity to sync files between my laptop and my desktop pc. On my desktop machine (xp pro sp2) I have shared my "Visual Studio Projects" folder using windows simple...
9
by: Doug Glancy | last post by:
I got the following code from Francesco Balena's site, for disposing of Com objects: Sub SetNothing(Of T)(ByRef obj As T) ' Dispose of the object if possible If obj IsNot Nothing AndAlso...
1
by: =?Utf-8?B?S2Vubnk=?= | last post by:
I have one bat file that contains a command to startup Java Program. Then, I would like to create a cluster job to call the bat file. In case of one computer is down, another computer can also call...
3
by: Barry Flynn | last post by:
Hi I am working with a VB 2005 program which has been converted from VB6. It writes data out to a flat file, with code like the following line WriteLine(riFileNo, "Hist", lsAssetID,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.