命令执行
Channel @jahsfgj5fw6
You can view and join @jahsfgj5fw6 right away.
Rating out of 10 5.8 Rating out of 10 5.8 /10 System score · How ratings work
- Subscribers
- 18,949
- Last post
- 1d ago
Collected on 2026-11-21 · not real-time
Introduction
You can view and join @jahsfgj5fw6 right away.
Show the original Telegram description
You can view and join @jahsfgj5fw6 right away.
Rating breakdown
Algorithm v1 · How ratings workSystem score 5.8 (1 + contributions 4.81) · final 5.8
Dimension Input Value Weight Contribution
Content quality Not reviewed yet (counted as neutral 0.5) · 40% 0.50 40% +1.80
Safety Not reviewed yet (counted as neutral 0.5) · 30% 0.50 30% +1.35
Audience 18,949 subscribers · 12% 0.70 12% +0.76
Recent activity Last post 1d ago · 10% 1.00 10% +0.90
Telegram verified Not verified · 4% 0.00 4% —
Official backlink No linked tools · 4% 0.00 4% —
Recent posts
View all on Telegram对于C#通过程序来调用cmd命令的操作,网上有很多类似的文章,但很多都不行,竟是漫天的拷贝。我自己测试整理了一下。
代码:
string str = Console.ReadLine();
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false; //是否使用操作系统shell启动
p.StartInfo.RedirectStandardInput = true;//接受来自调用程序的输入信息
p.StartInfo.RedirectStandardOutput = true;//由调用程序获取输出信息
p.StartInfo.RedirectStandardError = true;//重定向标准错误输出
p.StartInfo.CreateNoWindow = true;//不显示程序窗口
p.Start();//启动程序
//向cmd窗口发送输入信息
p.StandardInput.WriteLine(str + "&exit");
p.StandardInput.AutoFlush = true;
//p.StandardInput.WriteLine("e…
2 views
#频道互推 #相似推荐
------------------------------
📢 小杂鱼漏打
📢 迪迦拯救昆明📸CCTV
📢 马桶先生
📢 三角洲MVP官方群
📢 天才交易员小福星日常
📢 简州 三角洲 【官方频道】
📢 kg集团
📢 昆明公开榜
📢 无忧三角洲官方频道
📢 白鹤拦截主频道
------------------------------
🤝 加入互推 · 获得曝光,赚邀请奖励
2 views
因为我们需要根据不同的操作类型,选择不同的脚本来进行执行,所以我们需要在代码里面判断一下操作系统类型。我们可以通过 RuntimeInformation.IsOSPlatform来判断。
static void Main()
{
string fileName="shell/";
//根据系统使用不同的shell文件
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
fileName += "win.bat";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
fileName += "linux.sh";
}
2 views Media
.在OSX上运行#
我在OSX上的.NET Core SDK版本为2.0.0 很久没更新了。
直接执行命令
2 views Media
使用的系统环境为CentOS 7.2,.NET Core sdk版本为2.0.3。
直接执行命令结果如下:
2 views Media
Similar Telegram resources
Profile
Type Channel
Username t.me/jahsfgj5fw6
Category Development
Telegram verified No
Collected 2026-11-21
About the data
Counts, verification and recent posts come from periodic snapshots of Telegram's public pages and are not real-time. Descriptions are edited; the original text is available under the original description.