如何在远程启动其他系统上的应用程序?

时间:2022-12-03 20:45:31

I've got a situation where i have one system running a master application that communicates with slave applets on other systems, problem is, i can't guarentee that the slave applets will be running, nor that an operator can physically utilize the system to start the applet (and I'm also assuming they don't know how to use Remote desktop, these are minimum wage test operators)

我有一种情况,我有一个系统运行一个主应用程序,与其他系统上的奴隶小程序进行通信,问题是,我不能保证奴隶小程序将运行,也不是操作员可以物理利用系统来启动applet(我也假设他们不知道如何使用远程桌面,这些是最低工资测试操作员)

Is there an easy way to remotely launch an executeable on another system?

有没有一种简单的方法可以在另一个系统上远程启动可执行文件?

security is not a concern here as this is a closed network.

安全性不是一个问题,因为这是一个封闭的网络。

6 个解决方案

#1


If you're on the same network and have access credentials (username+password) to the remote computer, then Mark Russinovich's PsExec is just the tool you need.

如果您在同一个网络上并拥有远程计算机的访问凭据(用户名+密码),那么Mark Russinovich的PsExec就是您需要的工具。

#2


WMI is your friend. See the following article which covers starting processes locally and remotely using WMI:

WMI是你的朋友。请参阅以下文章,其中介绍了使用WMI在本地和远程启动进程:

How To: (Almost) Everything In WMI via C# Part 2: Processes (CodeProject)

如何:(几乎)通过C#在WMI中的所有内容#第2部分:进程(CodeProject)

Kev

#3


Any chance of converting the remote applets into Windows services? They can be configured to start when the system starts; to retry if they fail; and to notify someone if there are problems. They're quite trivial to create with Visual Studio.

有可能将远程小程序转换为Windows服务吗?它们可以配置为在系统启动时启动;如果失败则重试;并在有问题时通知某人。使用Visual Studio创建它们非常简单。

#4


here's a 2 step solution

这是一个两步解决方案

  1. Write a batch file to kick start the application/service in the context
  2. 编写批处理文件以启动上下文中的应用程序/服务

  3. Have the batch file on a shared network path which can be accessed from the machine would like to launch the application/service.
  4. 让共享网络路径上的批处理文件可以从计算机访问,以启动应用程序/服务。

Honestly, I would suggest the PsExec solution by Piskvor. But you can try out this as well ;)

老实说,我建议Piskvor的PsExec解决方案。但你也可以试试这个;)

#5


You can use the Windows AT command to schedule tasks on a remote machine.

您可以使用Windows AT命令在远程计算机上计划任务。

#6


another simple solution if you're not on the same network (accessing your home computer to run teamviewer for example) is to create a rule in Outlook (if you have it) whereas if you receive an email say from yourself, you can have it start an application if there are certain pieces of text in the message body or subject line, for example:

另一个简单的解决方案,如果你不在同一个网络(访问你的家庭计算机以运行teamviewer)是在Outlook中创建一个规则(如果你有),而如果你收到一封自己发的电子邮件,你可以拥有它如果邮件正文或主题行中存在某些文本,则启动应用程序,例如:

Create a mailbox rule: Step 1 - Conditions: From & With specific words in the body (from being your mail address and the message body: Start Teamviewer Step 2 - Start Application (browse to the location of the .exe you want to launch) Step 3 - enable that bad boy!

创建邮箱规则:步骤1 - 条件:来自和使用正文中的特定单词(来自您的邮件地址和邮件正文:启动Teamviewer步骤2 - 启动应用程序(浏览到要启动的.exe的位置)第3步 - 让那个坏男孩!

Obviously, you have to have Outlook open and accepting incoming mail in order for this to work.

显然,您必须打开Outlook并接受传入邮件才能使其正常工作。

you can tailor this to your requirements, ie: if Start Teamviewer is too easy, you can put codes or passwords in there too, so when the email arrives, it'll read the message, recognise the info based on the rule, and launch the application. :)

你可以根据你的要求定制它,即:如果Start Teamviewer太简单了,你也可以在其中放置代码或密码,所以当电子邮件到达时,它会读取消息,根据规则识别信息,然后启动应用程序。 :)

#1


If you're on the same network and have access credentials (username+password) to the remote computer, then Mark Russinovich's PsExec is just the tool you need.

如果您在同一个网络上并拥有远程计算机的访问凭据(用户名+密码),那么Mark Russinovich的PsExec就是您需要的工具。

#2


WMI is your friend. See the following article which covers starting processes locally and remotely using WMI:

WMI是你的朋友。请参阅以下文章,其中介绍了使用WMI在本地和远程启动进程:

How To: (Almost) Everything In WMI via C# Part 2: Processes (CodeProject)

如何:(几乎)通过C#在WMI中的所有内容#第2部分:进程(CodeProject)

Kev

#3


Any chance of converting the remote applets into Windows services? They can be configured to start when the system starts; to retry if they fail; and to notify someone if there are problems. They're quite trivial to create with Visual Studio.

有可能将远程小程序转换为Windows服务吗?它们可以配置为在系统启动时启动;如果失败则重试;并在有问题时通知某人。使用Visual Studio创建它们非常简单。

#4


here's a 2 step solution

这是一个两步解决方案

  1. Write a batch file to kick start the application/service in the context
  2. 编写批处理文件以启动上下文中的应用程序/服务

  3. Have the batch file on a shared network path which can be accessed from the machine would like to launch the application/service.
  4. 让共享网络路径上的批处理文件可以从计算机访问,以启动应用程序/服务。

Honestly, I would suggest the PsExec solution by Piskvor. But you can try out this as well ;)

老实说,我建议Piskvor的PsExec解决方案。但你也可以试试这个;)

#5


You can use the Windows AT command to schedule tasks on a remote machine.

您可以使用Windows AT命令在远程计算机上计划任务。

#6


another simple solution if you're not on the same network (accessing your home computer to run teamviewer for example) is to create a rule in Outlook (if you have it) whereas if you receive an email say from yourself, you can have it start an application if there are certain pieces of text in the message body or subject line, for example:

另一个简单的解决方案,如果你不在同一个网络(访问你的家庭计算机以运行teamviewer)是在Outlook中创建一个规则(如果你有),而如果你收到一封自己发的电子邮件,你可以拥有它如果邮件正文或主题行中存在某些文本,则启动应用程序,例如:

Create a mailbox rule: Step 1 - Conditions: From & With specific words in the body (from being your mail address and the message body: Start Teamviewer Step 2 - Start Application (browse to the location of the .exe you want to launch) Step 3 - enable that bad boy!

创建邮箱规则:步骤1 - 条件:来自和使用正文中的特定单词(来自您的邮件地址和邮件正文:启动Teamviewer步骤2 - 启动应用程序(浏览到要启动的.exe的位置)第3步 - 让那个坏男孩!

Obviously, you have to have Outlook open and accepting incoming mail in order for this to work.

显然,您必须打开Outlook并接受传入邮件才能使其正常工作。

you can tailor this to your requirements, ie: if Start Teamviewer is too easy, you can put codes or passwords in there too, so when the email arrives, it'll read the message, recognise the info based on the rule, and launch the application. :)

你可以根据你的要求定制它,即:如果Start Teamviewer太简单了,你也可以在其中放置代码或密码,所以当电子邮件到达时,它会读取消息,根据规则识别信息,然后启动应用程序。 :)