 |
写一个批处理文件,每次调用即可
net use \\172.18.18.162\ipc$ modern/user:administrator
net time \\172.18.18.162 /set /y
在VC中加上
SHELLEXECUTEINFO sei;
memset(&sei, 0, sizeof(SHELLEXECUTEINFO));
sei.cbSize = sizeof(SHELLEXECUTEINFO);
sei.fMask = SEE_MASK_NOCLOSEPROCESS;
sei.lpVerb = _T("open");
sei.lpFile = _T(rarPath); //批处理文件名地址
sei.lpParameters = _T(CommandLine);
sei.nShow = SW_SHOWDEFAULT; //SW_HIDE
ShellExecuteEx(&sei);
客户端机器为WINDOWS 2000PRO 可用,但2000SER不好用。
此问题由yufuyong回答。
附加关键字:编程, 源程序, programming, source code, C/C++, MFC, C++ Builder, Borland C++, Turbo C, C, BCB, 网络与通信, network, communicate, com, com1, com2。
|