Home All Groups Group Topic Archive Search About

Run exe on LAN machine

Author
16 Dec 2005 5:52 AM
Zeeshan Gulzar
Please tell me how i can run .exe file on a LAN machine. I have
administrative permissions. I am using C#.NET

Author
16 Dec 2005 6:49 AM
Truong Hong Thi
On your machine, Control Panel/Administration Tools, there are 2 tools
for you to change code-access permissions.
The easiest way is using "Microsoft .NET Framework 1.1 Wizards/Trust an
assembly", browse to the exe on the LAN, and increase level of trust.
You may need to trust its dependencies also. "The Microsoft .NET
Framework 1.1 Configuration" provide finer grained configuration, but
requires some knowledge of code acess security.

Thi
Author
16 Dec 2005 12:14 PM
Zeeshan Gulzar
Thanks Thi

I think i did'nt explain well. The exe file is not a .net exe. this is c++
unmanaged exe or it may be notepad.exe. what code i will write in C# in order
to run notepad.exe or any exe on LAN machine.
Thanks again for your replay.

Show quote
"Truong Hong Thi" wrote:

> On your machine, Control Panel/Administration Tools, there are 2 tools
> for you to change code-access permissions.
> The easiest way is using "Microsoft .NET Framework 1.1 Wizards/Trust an
> assembly", browse to the exe on the LAN, and increase level of trust.
> You may need to trust its dependencies also. "The Microsoft .NET
> Framework 1.1 Configuration" provide finer grained configuration, but
> requires some knowledge of code acess security.
>
> Thi
>
>
Author
16 Dec 2005 1:01 PM
Truong Hong Thi
I don't think there is any different lauching a exe on LAN or local.
Use Process class:
Process p = new Process();
p.StartInfo.FileName = @"\\machine\share\notepad.exe";
p.Start();

Hope it helps,
Thi
Author
17 Dec 2005 1:38 AM
Lau Lei Cheong
Actually, I think the OP want to run an EXE on a computer on local network.

There is two way I can think of:
1) your EXE is running under a Windows Service wrapper that have been
installed on the remote machine. So you can use "sc" command or
"ServiceController" class to control it remotely.
2) If the remote computer is running "REXEC" service(i.e. the Winsock
REXEC), you can use "rexec" command to execute the program.

Both methods require you to login as a valid user/run with identity of valid
user on the remote machine.

"Truong Hong Thi" <thi1***@gmail.com>
???????:1134738102.760427.203***@z14g2000cwz.googlegroups.com...
Show quote
>I don't think there is any different lauching a exe on LAN or local.
> Use Process class:
> Process p = new Process();
> p.StartInfo.FileName = @"\\machine\share\notepad.exe";
> p.Start();
>
> Hope it helps,
> Thi
>

AddThis Social Bookmark Button