远程流程执行流程

2023-09-06 08:19:47 作者:过期的情话 *

我之情况是连接到远程机器C#.NET,并列出与远程计算机上的所有进程。我可以杀死一个进程,或远程启动一个新的进程。问题是,当我执行一个新的进程上的遥控器,我可以看到在任务管理器的过程中,但它不apeear在Windows画面。任何想法,为什么它没有出现在窗口,但出现在任务管理器/进程。这是我执行code

 私人无效btnStartNew_Click(对象发件人,EventArgs的)
    {
        [对象] arrParams = {txtNewProcess.Text.Trim()};
        尝试
        {
            manageClass =新ManagementClass(的MyScope,新ManagementPath(Win32_Process的),新ObjectGetOptions());
            manageClass.InvokeMethod(创建,arrParams);
            btnConnect_Click(发件人,E);
        }
        赶上(例外前)
        {
            的MessageBox.show(ex.ToString());
        }
    }
 

我的范围是:

 的MyScope =新的管理范围(@\ ROOT \ CIMV2,connOptions);
 

解决方案

这个问题是有关管理员权限

bazel远程构建 Remote Execution

My scenerio is connection to remote machine with C#.Net, and listing all processes with that remote computer. I can kill a process, or start a new process at remote. The problem is, when I execute a new process on remote, I can see the process on task manager, but it doesnt apeear on windows screen. Any idea why its not appearing on windows, but appearing on task manager/ process. Here is my execution code

private void btnStartNew_Click(object sender, EventArgs e)
    {
        object[] arrParams = { txtNewProcess.Text.Trim()};
        try
        {
            manageClass = new ManagementClass(myScope, new ManagementPath("Win32_Process"), new ObjectGetOptions());
            manageClass.InvokeMethod("Create", arrParams);
            btnConnect_Click(sender, e);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
    }

My Scope is :

myScope = new ManagementScope(@"\ROOT\CIMV2", connOptions);

解决方案

the problem is about administrator permissions

 
精彩推荐
图片推荐