예전에 테스트해봤는데 신기하게 실제로 되더군요.
How do I execute a DOS command / batch file / exe from ASP?
23,985 requests - last updated Tuesday, February 19, 2002
--------------------------------------------------------------------------------
You can use ASPExec from ServerObjects or DynuExec from Dynu. Alternatively, if you have Windows
Script Host installed, you can do this (sorry, I've only had the time to test .bat files):
<%
set wshell = server.createobject("wscript.shell")
wshell.run "c:\file.bat"
set wshell = nothing
%>
Where c:\file.bat is something like:
net stop iisadmin /y
net start w3svc
If you are trying to run a command that has output, you may want to investigate piping the output to a
text file that you can than read using FileSystemObject from ASP.
'WEB > ASP / DotNet' 카테고리의 다른 글
| FSO 방식의 스킨 구현 (0) | 2007/06/07 |
|---|---|
| Data Caching을 이용한 ASP성능향샹 (0) | 2007/06/07 |
| asp로 도스명령어를 실행시켜주는 컴포넌트 (0) | 2007/06/07 |
| 맥 어드레스 얻기 (0) | 2007/06/07 |
| ADO/ASP를 이용하여 데이터를 FlexGrid에 나타내는 방법 (0) | 2007/06/07 |
| MSSQL-2000 전체 텍스트 검색을 사용하여 웹을 검색 (0) | 2007/06/07 |
0 Trackback,
0 Comment,
:




최근에 달린 댓글
링크
최근에 받은 트랙백
태그목록