{"id":569,"date":"2009-08-09T15:47:00","date_gmt":"2009-08-09T07:47:00","guid":{"rendered":""},"modified":"2013-11-17T12:53:48","modified_gmt":"2013-11-17T04:53:48","slug":"asp-net%e5%ae%9e%e7%8e%b0%e8%b0%83%e7%94%a8%e5%a4%96%e9%83%a8%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/569.html","title":{"rendered":"ASP.NET\u5b9e\u73b0\u8c03\u7528\u5916\u90e8\u7a0b\u5e8f"},"content":{"rendered":"<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nusing System.Diagnostics; \r\n\r\n    protected void Page_Load(object sender, EventArgs e)\r\n    {\r\n        Process.Start(@&quot;D:\\Program Files\\CodeGear\\Projects\\\u53d1\u90ae\u4ef6\\\u53d1\u90ae\u4ef6.exe&quot;, &quot;123456&quot;);\r\n\r\n}\r\n<\/pre>\n<p>\u4f7f\u7528Process\u5bf9\u8c61\uff1a <\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nSystem.Diagnostics.Process p=new System.Diagnostics.Process(); \r\np.StartInfo.FileName=&quot;arj.exe&quot; ;\/\/\u9700\u8981\u542f\u52a8\u7684\u7a0b\u5e8f\u540d \r\np.StartInfo.Arguments=&quot;-x sourceFile.Arj c:\\temp&quot;;\/\/\u542f\u52a8\u53c2\u6570 \r\np.Start();\/\/\u542f\u52a8 \r\nif(p.HasExisted)\/\/\u5224\u65ad\u662f\u5426\u8fd0\u884c\u7ed3\u675f \r\np.kill();\r\n<\/pre>\n<p>\u9879\u76ee\u4e2d\u7684\u4f8b\u5b50\uff1a<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nProcess p=new Process();\r\n \/\/p.Start(Server.MapPath(&quot;main.exe&quot;),Server.MapPath(URL1)+&quot; &quot;+id+&quot; &quot;+Server.MapPath(DownURL));\r\n p.StartInfo.FileName = Server.MapPath(&quot;main.exe&quot;);          \/\/\u6587\u4ef6\r\n p.StartInfo.Arguments = Server.MapPath(URL1) + &quot; &quot; + id + &quot; &quot; + Server.MapPath(DownURL); \/\/\u547d\u4ee4\r\n p.Start();\r\n p.WaitForExit(3000);   \r\n if (p.HasExited == false) { p.Kill(); }              \/\/3\u79d2\u540e\u5f3a\u5236\u9000\u51fa\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>using System.Diagnostics; protected void Page_Load(obje [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-569","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=569"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/569\/revisions"}],"predecessor-version":[{"id":4607,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/569\/revisions\/4607"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}