forked from yangjinming1062/RecordWin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ad84cf
commit e6baa4e
Showing
14 changed files
with
102 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace RecordWin | ||
{ | ||
public static class Functions | ||
{ | ||
/// <summary> | ||
/// 调用cmd命令 | ||
/// </summary> | ||
public static void CMD(string args) | ||
{ | ||
Process cmd = new Process(); | ||
cmd.StartInfo.FileName = string.Format("cmd.exe"); | ||
cmd.StartInfo.UseShellExecute = false; //是否使用操作系统shell启动 | ||
cmd.StartInfo.RedirectStandardInput = true;//接受来自调用程序的输入信息 | ||
cmd.StartInfo.RedirectStandardOutput = true;//由调用程序获取输出信息 | ||
cmd.StartInfo.RedirectStandardError = true;//重定向标准错误输出 | ||
cmd.StartInfo.CreateNoWindow = true;//不显示程序窗口 | ||
cmd.Start();//启动程序 | ||
cmd.StandardInput.WriteLine(args + "&exit"); | ||
cmd.StandardInput.AutoFlush = true; | ||
cmd.StandardInput.Close(); | ||
cmd.BeginOutputReadLine(); | ||
cmd.BeginErrorReadLine(); | ||
cmd.WaitForExit(); | ||
cmd.Close(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="7z.NET" version="1.0.3" targetFramework="net48" /> | ||
</packages> |