vb.net - 如何使用 vb.net 和 cmd 检查程序是否在不同的服务器上运行
问题描述
我需要检查是否有任何程序在我有权访问的不同服务器上运行。
例如: 服务器名称:remoteServer.xyz.com
应用程序:Notepad.exe
从我的机器作为管理员我可以访问remoteServer.xyz.com
所以我如何检查是否Notepad.exe
正在remoteServer.xyz.com
使用vb.net
和cmd
我使用了以下代码
Dim p As Process = New Process()
Dim pi As ProcessStartInfo = New ProcessStartInfo()
pi.Arguments = "tasklist /s remoteServer.xyz.com"
pi.FileName = "cmd.exe"
p.StartInfo = pi
p.Start()
但这只是打开一个命令提示符,不传递参数并执行
解决方案
推荐阅读
- regex - 如何匹配最早和最晚的开始时间并将它们连同相应的详细信息一起打印出来?
- multithreading - Application.Run(new Form1()) 停止执行进一步的代码
- javascript - 为我的家庭作业设计 Javascript Hangman 猜谜游戏,但无法让代码工作
- ios - 注释是否会从可执行的 Objective-C 中删除
- javascript - react如何使用react-router在app.js中渲染多个页面?
- python - 如何使用 Python 在 SQLServer2017 中插入多行
- excel - 仅当有一个时才删除中间首字母
- vue.js - 为什么没有添加路由 $router.addRoutes?
- node.js - 如何解决“不正常超时!” 在测试 fastify 路线时?
- angular - Angular 环境变量停止工作 - Heroku 应用程序