run .exe on networked computer

J

jdrott1

can this code be modified to run a .exe on a networked computer?

i have this for starting a local program:

System.Diagnostics.Process.Start("C:\program.exe")

i.e. does it work with ip address or mapped network drives?
 
M

Michel Posseth [MCP]

Yes it can ,,

However the apropriate settings must be applyed to run .Net executables from
the network standard it will not function but crash with a security
exception
so set the correct trust level with the local framework settings tools an it
wil function .

Note that a sysadmin can do this for all his computers with a group policy


regards

Michel
 
K

kimiraikkonen

can this code be modified to run a .exe on a networked computer?

i have this for starting a local program:

System.Diagnostics.Process.Start("C:\program.exe")

i.e. does it work with ip address or mapped network drives?

If you have a proper sharing and security configuration on your LAN,
you can try to invoke the program on a different computer on the same
local network using UNC path:

' Where SharedDocs is Shared Documents folder
System.Diagnostics.Process.Start("\\PC_NAME\SharedDocs\program.exe")

Hope this helps,

Onur Güzel
 
P

Phill W.

jdrott1 said:
can this code be modified to run a .exe on a networked computer?

Do you mean:

(a) "run a program /from/ a networked computer"
Yes you can, but the code executes on the /local/ machine's CPU and only
if you tell the .Net Framework to "trust" code loaded from that
particular machine, or you're running Framework 3.5 SP1, see [awfully
long] link:

http://blogs.msdn.com/vancem/archiv...code-to-be-launched-from-a-network-share.aspx

(b) "run a program /on/ a networked computer"
No. Thankfully, you can't directly start a process on a remote
machine's CPU.

HTH,
Phill W.
 
R

rowe_newsgroups

However the apropriate settings must be applyed to run .Net executables from
the network standard it will not function but crash with a security
exception
so set the correct trust level with the local framework settings tools an it
wil function .

Much to my surprise this has been changed with .NET 3.5 SP1, we
finally can run .NET apps from the network without many headaches!

Prior to my posting this, Phill gave a link to a blog describing the
change, here's the link in smaller form:

http://snurl.com/3jwfn

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
J

jdrott1

Much to my surprise this has been changed with .NET 3.5 SP1, we
finally can run .NET apps from the network without many headaches!

Prior to my posting this, Phill gave a link to a blog describing the
change, here's the link in smaller form:

http://snurl.com/3jwfn

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/

cool, thanks it did work. it's not really how i need it to work
though. it run the .exe on the local computer. i need the item to
start on the remote machine.

System.Diagnostics.Process.Start("Y:\program.exe")
 
M

Michel Posseth [MCP]

Hmmm ,,, it took them a while but at least they have finally done it

This is a lost feature i am verry happy with getting back ( from VB6 )
and will sure be an extra argument to roll out SP1 a bit sooner in our
company

Thanks Phill and Seth for the provided link
 

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