首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PSTools和VB.net:系统找不到指定的文件

PSTools和VB.net:系统找不到指定的文件
EN

Stack Overflow用户
提问于 2014-01-08 04:51:58
回答 1查看 429关注 0票数 0

我试图写一个程序,为工作,将能够告诉我,如果一个人登录到多台电脑。

我在使用PStool的PSloggedon cmd。

下面是我正在试验的代码:

私有子Button1_Click(发送方为System.Object,e为System.EventArgs)处理sender 1。

代码语言:javascript
复制
    Dim Proc As New System.Diagnostics.Process
    Proc.StartInfo = New ProcessStartInfo("psLoggedon")
    'right now the textbox will hold a PC ID from a list of PC's in a database.
    Proc.StartInfo.Arguments = "-l \\" & TextBox1.Text & ""
    Proc.StartInfo.RedirectStandardOutput = True
    Proc.StartInfo.UseShellExecute = False
    Proc.StartInfo.CreateNoWindow = True
    Proc.Start()



    MsgBox(Proc.StandardOutput.ReadToEnd)



    Proc.Close()



End Sub

但我得到了这个错误:

未处理Win32Exception :系统找不到指定的文件

我在这里查过:

C:\Windows\System32 32

并确保应用程序文件被复制到那里。

有人能帮我解释一下我能做些什么来解决这个问题吗?

附注:我在使用windows 7

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-01-08 05:13:44

使用

代码语言:javascript
复制
string filePath = Environment.GetFolderPath(Environment.SpecialFolder.Windows) + "\\sysnative";

32位系统命令

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20987289

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档