在远程PC上运行可执行文件 - vb.net [英] Run an executable on a remote pc - vb.net

查看:115
本文介绍了在远程PC上运行可执行文件 - vb.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VB.Net中编写了一个小应用程序,它使用代码同时启动两个程序:



System.Diagnostics.Process.Start(My.Settings。 App1_Path)

System.Diagnostics.Process.Start(My.Settings.App2_Path)



,这很好用。



但是,有些用户在单独的联网PC上有一个程序,并且更喜欢让它在该机器上运行,当然上面的代码也没有发生。



无论如何都要对此进行编码吗?



现在设置App1和App2路径用户通过打开文件对话框浏览可执行文件。



谢谢



我尝试了什么:



我已经很好地了解了谷歌等等,并没有发现任何能给我一个指针的答案正确的方向。

I have coded a small app in VB.Net that starts two programs simultaneously using the code:

System.Diagnostics.Process.Start(My.Settings.App1_Path)
System.Diagnostics.Process.Start(My.Settings.App2_Path)

and that works just fine.

However, some users have one of the programs on a separate networked PC and prefer to have it running on that machine, and of course with the code above that doesn't happen.

Is there anyway to code this to happen?

As it stands the App1 and App2 paths are set by the user browsing to the executable files with on open file dialog.

Thanks

What I have tried:

I've had a good look around Google etc. and haven't discovered any answers that would give me a pointer to the right direction.

推荐答案

你的帐户用于启动应用程序必须具有存储应用程序的网络位置的读取权限。



此外,您的代码在本地运行,必须具有远程管理员权限PC为了让它启动应用程序。您不能在.NET Framework中使用Process类。它没有任何支持在远程计算机上启动。



WMI(以及Win32_Process类)通常用于启动远程进程。启动远程进程的问题在于它不能是一个交互式进程。这意味着如果希望远程计算机上的用户能够看到应用程序并与之交互,那么由于安全原因,这不会发生。想一想。



谷歌搜索结果vb.net wmi win32_process在远程PC上启动 [ ^ ]
The account that you use to launch the application MUST have read access to the network location the app is stored in.

Also, your code, running locally, MUST have admin permissions to the remote PC in order to get it to launch the application. You can NOT use the Process class in the .NET Framework. It doesn't have any support for launching on a remote machine.

WMI (and the Win32_Process class) is commonly used to launch a remote process. The problem with launching a remote process is that it can NOT be an interactive process. This means that if expect the user on the remote machine to be able to see the application and interact with it, that's not going to happen because of security reasons. Think about that for a second.

Google results for "vb.net wmi win32_process launch on remote PC"[^]


这篇关于在远程PC上运行可执行文件 - vb.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆