解决方案 »

  1.   

    下载pstools,其中有个命令psexec,可以远程执行,用命令行调用它。前提是你有目标电脑的管理员账户密码。
    当然你也可以使用ssh/powershell之类的管理工具,自己google。
      

  2.   

    如果你有对方的密码 那就好说
    如果没有密码 是木马或者远程控制类的 C#做是可以 但是有个问题
    别人如果想在电脑上运行你的木马 还要下载个几十兆的.NetFramework
      

  3.   

    Three ways to run remote Windows commands
    http://4sysops.com/archives/three-ways-to-run-remote-windows-commands/Method 1: Use Sysinternals’ PSExec
    Method 2: Use WMI to run remote commands
    Method 3: Use ControlUp to run remote commands文件操作啥意思?直接共享后,写局域网文件 File.***("\\computername\aaa\bbb.txt")?要有权限。
      

  4.   

    谢谢大家的回答,我少说明了,我用的开发语言是C#,目的主机使用的是windows2003操作系统
    大家帮我看看这两个方法有什么问题么?
    // 验证是否能连接到远程计算机
            public static bool RemoteConnectValidate(string host, string userName, string password)
            {
                ConnectionOptions connOption = new ConnectionOptions();
                connOption.Username = host + @"\" + userName;
                connOption.Password = password;            ManagementPath mngPath = new ManagementPath(@"\\" + host + @"\root\cimv2:Win32_Process");
                ManagementScope scope = new ManagementScope(mngPath, connOption);            try
                {
                    scope.Connect();
                }
                catch
                {
                }
                return scope.IsConnected;
            }
            //执行cmd命令
            public void ExecutionCmd(string strCommand,string host)
            {
                ManagementPath mngPath = new ManagementPath(@"\\" + host + @"\root\cimv2:Win32_Process");
                ObjectGetOptions objOption = new ObjectGetOptions();
                ManagementClass classInstance = new ManagementClass(managementScope, mngPath, objOption);
                int ProcessId = 0;
                object[] cmdline = { "cmd/c " + strCommand, mngPath, null, ProcessId };
                //调用执行命令的方法
                classInstance.InvokeMethod("Create", cmdline);        }
    我还想了解root\cimv2:Win32_Process是什么意思,谢谢大家了