




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、1.ÒýÓÃusing System.IO;using Microsoft.Win32;using System.Diagnostics;/* ³ÌÐòÓÃ;:ʵÏÖÎļþÎļþ¼ÐѹËõ½âѹ¹¦ÄÜ
2、86;¯Êý³ÌÐò±¸×¢: * ·þÎñÆ÷¶ËWinRARÖ§³Ö * ·¾¶¼òÊö±ØÐë¾ø¶Ô·¾¶*/2.Ö÷Ò
3、0;´úÂë֮ѹËõ / <summary> / ѹËõÎļþ / </summary> / <param name="DFilePath">ÐèҪѹËõµÄÎļþ¼Ð»ò
4、;Õßµ¥¸öÎļþ</param> / <param name="DRARName">Éú³ÉѹËõÎļþµÄÎļþÃû</param> / <param name="DRARPath">É&
5、#250;³ÉѹËõÎļþ±£´æ·¾¶</param> / <returns></returns> protected bool RAR(string DFilePath, string DRARName,string DRARPath) String the_rar; RegistryKey the_Reg; Object the_Obj; String the_Info
6、; ProcessStartInfo the_StartInfo; Process the_Process; try the_Obj = the_Reg.GetValue(""); the_rar = the_Obj.ToString(); the_Reg.Close(); the_rar = the_rar.Substring(1, the_rar.Length - 7); the_Info = " a " + " " + DRARName + " " + DFilePath; /Ãü
7、3;î + ѹËõºóÎļþÃû + ±»Ñ¹ËõµÄÎļþ»òÕß·¾¶ the_StartInfo = new ProcessStartInfo(); the_StartInfo.FileName = the_rar; the_StartInfo.Argum
8、ents = the_Info; the_StartInfo.WindowStyle = ProcessWindowStyle.Hidden; the_StartInfo.WorkingDirectory = DRARPath ; /RaRÎļþµÄ´æ·ÅĿ¼¡£ the_Process = new Process(); the_Process.StartInfo = the_StartInfo; the_Process.Sta
9、rt(); return true; catch (Exception ex) return false; 3.Ö÷Òª´úÂëÖ®½âѹ / <summary> / ½âѹËõµ½Ö¸¶¨Îļþ¼Ð / </summary> / <param
10、 name="RARFilePath">ѹËõÎļþ´æÔÚµÄĿ¼ </param> / <param name="RARFileName">ѹËõÎļþÃû³Æ </param> / <param
11、 name="UnRARFilePath">½âѹµ½Îļþ¼Ð</param> / <returns></returns> protected bool UnRAR(string RARFilePath,string RARFileName,string UnRARFilePath) /½âѹËõ String the_rar; RegistryK
12、ey the_Reg; Object the_Obj; String the_Info; ProcessStartInfo the_StartInfo; Process the_Process; try the_Obj = the_Reg.GetValue(""); the_rar = the_Obj.ToString(); the_Reg.Close(); the_rar = the_rar.Substring(1, the_rar.Length - 7); the_Info = " X " + " " + RARFilePath
13、+ RARFileName + " " + UnRARFilePath; the_StartInfo = new ProcessStartInfo(); the_StartInfo.FileName = the_rar; the_StartInfo.Arguments = the_Info; the_StartInfo.WindowStyle = ProcessWindowStyle.Hidden; the_Process = new Process(); the_Process.StartInfo = the_StartInfo; the_Process.Start();
14、 return true; catch (Exception ex) return false; 3.ʾÀý string oFilePath = "C:1" string oRARFileName = "1.rar" string oToFilePath = "C:2" /if (RAR(oFilePath, oRARFileName, oToFilePath) if (UnRAR(oFilePath, oRARFileName, oToFilePath) Response.Write(&q
15、uot;OK"); else Response.Write("No"); 1.ÒýÓÃusing System.IO;using Microsoft.Win32;using System.Diagnostics;/* ³ÌÐòÓÃ;:ʵÏÖÎļþÎļþ¼ÐѹËõ
16、;½âѹ¹¦Äܺ¯Êý³ÌÐò±¸×¢: * ·þÎñÆ÷¶ËWinRARÖ§³Ö * ·¾¶¼òÊö±ØÐë¾ø¶
17、2;·¾¶*/2.Ö÷Òª´úÂë֮ѹËõ / <summary> / ѹËõÎļþ / </summary> / <param name="DFilePath">ÐèҪѹËõµ&
18、#196;Îļþ¼Ð»òÕßµ¥¸öÎļþ</param> / <param name="DRARName">Éú³ÉѹËõÎļþµÄÎļþÃû</param&
19、gt; / <param name="DRARPath">Éú³ÉѹËõÎļþ±£´æ·¾¶</param> / <returns></returns> protected bool RAR(string DFilePath, string DRARName,string DRARPath) String the_rar;
20、RegistryKey the_Reg; Object the_Obj; String the_Info; ProcessStartInfo the_StartInfo; Process the_Process; try the_Obj = the_Reg.GetValue(""); the_rar = the_Obj.ToString(); the_Reg.Close(); the_rar = the_rar.Substring(1, the_rar.Length - 7); the_Info = " a " + " " + DRA
21、RName + " " + DFilePath; /ÃüÁî + ѹËõºóÎļþÃû + ±»Ñ¹ËõµÄÎļþ»òÕß·¾¶ the_StartInfo = new ProcessStartInfo(); t
22、he_StartInfo.FileName = the_rar; the_StartInfo.Arguments = the_Info; the_StartInfo.WindowStyle = ProcessWindowStyle.Hidden; the_StartInfo.WorkingDirectory = DRARPath ; /RaRÎļþµÄ´æ·ÅĿ¼¡£ the_Process = new Process(); th
23、e_Process.StartInfo = the_StartInfo; the_Process.Start(); return true; catch (Exception ex) return false; 3.Ö÷Òª´úÂëÖ®½âѹ / <summary> / ½âѹËõµ½Ö¸¶¨ÎÄ
24、88;þ¼Ð / </summary> / <param name="RARFilePath">ѹËõÎļþ´æÔÚµÄĿ¼ </param> / <param name="RARFileName">ѹËõÎļþ
25、;Ãû³Æ </param> / <param name="UnRARFilePath">½âѹµ½Îļþ¼Ð</param> / <returns></returns> protected bool UnRAR(string RARFilePath,string RARFileName,string UnRARFilePath) /½âѹËõ String the_rar; RegistryKey the_Reg; Object the_Obj; String the_Info; ProcessStartInfo the_StartInfo; Process the_Process; try
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年中國石制柜門拉手市場調(diào)查研究報告
- 行政部個人年終總結(jié)
- 籃球館改造補貼協(xié)議
- 2025年度辦事處財務(wù)培訓(xùn)與咨詢服務(wù)協(xié)議
- 知識產(chǎn)權(quán)居間合同條款研究
- 足浴城裝修施工合同范本
- 月子中心合作協(xié)議書范本
- 分公司獨立核算協(xié)議書范本
- 水電預(yù)留預(yù)埋安裝包工合同范本
- 幼兒園教學(xué)點合作協(xié)議書范本
- 冀教版英語九年級Unit 5 單詞短語預(yù)習(xí)復(fù)習(xí)單
- 公司安全生產(chǎn)監(jiān)督管理辦法
- 鋼筋工工藝與實習(xí)(第二版)課件匯總?cè)珪娮咏贪竿暾嬲n件最全幻燈片(最新)課件電子教案幻燈片
- 煤礦從業(yè)人員考試題庫全答案(word版)
- 洞頂回填技術(shù)交底
- 最簡易的帕累托圖制作方法簡介PPT通用課件
- 城市軌道交通應(yīng)急處理課程標準
- 初二下分式混合計算練習(xí)1(附答案)
- (完整版)振幅調(diào)制與解調(diào)習(xí)題及其解答
- 抗震支架施工安裝合同
- JJG 657-2019 呼出氣體酒精含量檢測儀 檢定規(guī)程(高清版)
評論
0/150
提交評論