【ASP】執行應用程式並帶參數
首先註冊ASPEXEC.DLL(在asp裡要用此元件才能執行) a. 至 http://www.nodevice.com/dll/ASPEXEC_DLL/item1931.html 下載 b. 解壓縮後,將ASPEXEC.DLL放在C:\Windows\System32下 c. 開始 > 執行 > regsvr32 aspexec.dll d. 給予ASPEXEC.DLL檔IUSR讀取執行權限(檔案按右鍵,點選安全性) 程式部分: <% Set Executor = Server.CreateObject("ASPExec.Execute") Executor.Application = Server.MapPath("/pdf") & "/ABC.exe" '指定要執行的應用程式路徑 Executor.Parameters = "TEST" '執行應用程式所需的參數 strResult = Executor.ExecuteDosApp 'Debug 用 'Response.Write "<pre>" & strResult & "</pre>" 'Response.Write "Attempting to execute " & Executor.Application & "<br>" strResult1 = Executor.ExecutewinApp ...