c#求一个运行后自动删除自己的代码 rt 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://blog.csdn.net/wuyazhe/article/details/6022771 psi.Arguments = "/"" + Environment.GetCommandLineArgs()[0] + "/""; 编译通过不了。提示输入“;” public static void TestForKillMyself() { string bat = @"@echo off :tryagain del %1 if exist %1 goto tryagain del %0"; File.WriteAllText("killme.bat", bat);//写bat文件 ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = "killme.bat"; psi.Arguments = "/"" + Environment.GetCommandLineArgs()[0] + "/""; psi.WindowStyle = ProcessWindowStyle.Hidden; Process.Start(psi); } 太强了 public static void TestForKillMyself() { string bat = @"@echo off :tryagain del %1 if exist %1 goto tryagain del %0"; System.IO.File.WriteAllText("killme.bat", bat);//写bat文件 System.Diagnostics. ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(); psi.FileName = "killme.bat"; psi.Arguments = "\"" + Environment.GetCommandLineArgs()[0] + "\""; psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; System.Diagnostics.Process.Start(psi); } 不过是价格引用和改个\ psi.Arguments = "/"" + Environment.GetCommandLineArgs()[0] + "/""; 改为:psi.Arguments = "\"" + Environment.GetCommandLineArgs()[0] + "\""; 怎么修改DevExpress控件打印预览中的工具条 急 请教基础问题,两个控件的值为什么........ 输入法问题,求助 问题比较难。来高手,关于线程和webbrower控件的问题 菜鸟来了,大家来抢分:关于C#的WINDOWS窗口 脚本问题,100分,解决就接贴! 救急 CE下如何显示韩文,别人说只要安装了字体就可以,字体文件在哪里获得,如何使之工作? gei addwing 如何让点击鼠标左键也显示任务栏菜单? 初级问题:ado.net实体数据模型还是linq to sql? 如何自己设计、编写 DLL?
编译通过不了。提示输入“;”
{
string bat = @"@echo off
:tryagain
del %1
if exist %1 goto tryagain
del %0";
File.WriteAllText("killme.bat", bat);//写bat文件
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "killme.bat";
psi.Arguments = "/"" + Environment.GetCommandLineArgs()[0] + "/"";
psi.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(psi);
}
太强了
public static void TestForKillMyself()
{
string bat = @"@echo off
:tryagain
del %1
if exist %1 goto tryagain
del %0";
System.IO.File.WriteAllText("killme.bat", bat);//写bat文件
System.Diagnostics. ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
psi.FileName = "killme.bat";
psi.Arguments = "\"" + Environment.GetCommandLineArgs()[0] + "\"";
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
System.Diagnostics.Process.Start(psi);
}
不过是价格引用和改个\
改为:psi.Arguments = "\"" + Environment.GetCommandLineArgs()[0] + "\"";