1 Star 0 Fork 0

卦者灵風 / onmyojiPoXiao

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
DmSoftRegister.cs 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
yinpeng zhou 提交于 2022-09-12 16:10 . 添加项目文件。
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoXiao
{
internal class DmSoftRegister
{
public static string AutoRegCom(string strCmd)
{
string rInfo;
//注册大漠插件到系统
try
{
Process myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("cmd.exe");
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.CreateNoWindow = true;
myProcessStartInfo.RedirectStandardOutput = true;
myProcess.StartInfo = myProcessStartInfo;
myProcessStartInfo.Arguments = "/c " + strCmd;
myProcess.Start();
StreamReader myStreamReader = myProcess.StandardOutput;
rInfo = myStreamReader.ReadToEnd();
myProcess.Close();
rInfo = strCmd + "\r\n" + rInfo;
return rInfo;
}
catch (Exception ex)
{
return ex.Message;
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/galileo2/onmyoji-poxiao.git
git@gitee.com:galileo2/onmyoji-poxiao.git
galileo2
onmyoji-poxiao
onmyojiPoXiao
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891