通过命令提示符远程控制图形化vb.net程序

发布于 2024-11-17 16:03:19 字数 512 浏览 2 评论 0原文

我使用 Windows 窗体创建了一个 VB.NET 程序。该程序在远程 PC 上运行并在屏幕上显示信息。计算机甚至没有连接鼠标或键盘。程序根据加载的文件显示信息。

我希望能够将此文件远程更改为远程 PC 上已有的另一个文件。我无法使用图形远程桌面客户端,因为我们的带宽非常有限。

所以,我的想法是使用命令提示符更改文件(我想我需要 SSH 之类的东西)。我不知道该怎么做。我应该使用这样的东西并首先加载DosModule:

Module DOSModule
   Public Sub Main()
      Console.Write("First, start with Command Prompt processing ...")
      Dim myWinForm As New WinForm
      Application.Run(myWinForm)
   End Sub
End Module

然后我将如何读取发送到程序的命令?我也只想运行该程序的一个实例。

谢谢

I have created a VB.NET program using windows forms. The program runs on a remote PC and displays information on a screen. The computer does not even have a mouse or keyboard connected to it. The program shows the information based on the file that is loaded.

I want to be able to change this file remotely to another file that is already on the remote PC. I can't use a graphical remote desktop client as we have very limited bandwidth.

So, my idea is to change the file using the command prompt (I think I'll need something like SSH). I'm not sure how to do this. Should I use something like this and load DosModule first:

Module DOSModule
   Public Sub Main()
      Console.Write("First, start with Command Prompt processing ...")
      Dim myWinForm As New WinForm
      Application.Run(myWinForm)
   End Sub
End Module

How would I then read commands that is send to the program? I also only want one instance of the program running.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小鸟爱天空丶 2024-11-24 16:03:19

你有两个选择。第一个是自定义程序,无论您喜欢与否,都需要一些网络编程。我建议创建一个命令行批处理文件或 PowerShell 脚本,然后创建一个程序将脚本传输到远程计算机并执行该脚本。

第二个选项也是更适合您的一个选项是下载 SSH 服务器。 SSH 服务器本质上会打开一个命令窗口,并将输入和输出通过管道传输到计算机上运行的 telnet 客户端。如果您运行的是 Windows Server 版本,则 Windows Server 附带 SSH 服务器。否则,您可以在此处免费下载一个:http://www.freesshd.com/

安装后SSH 服务器,您只需在命令提示符下使用 telnet 即可连接到远程 SSH 服务器

You have 2 options. The first is a custom program that WILL require some network programming, like it or not. I would suggest creating either a Command-Line batch file or else a PowerShell script, then creating a program to transfer the script to the remote computer and execute the script.

The second option and the one better suited for you would be to download an SSH server. An SSH server will essentially open a command window and pipe the input and output over to a telnet client running on your machine. If you are running a version of Windows Server, an SSH server comes with Windows Server. Otherwise, you can download one for free here: http://www.freesshd.com/

Once you install the SSH server, you simply use telnet, from a command prompt, to link up with your remote SSH server

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文