Groups | Blog | Home
all groups > asp.net announcements > october 2003 >

asp.net announcements : RUN/execute a Command-Line command from an ASP page


Lucas Cowald
10/22/2003 4:14:40 AM
Hi,
I need to RUN/execute a Command-Line command from an ASP page.

This is the command:
sse45.exe -i k:\o\2.wmv -o k:\o\2.shh -w 128 -df 0 -m 2 -p

Can you show me a code how to run this command from an ASP page? I need to
run it from an ASP/VBscript?

Thank you very much for your help!

imtiazh NO[at]SPAM online.microsoft.com.
11/3/2003 5:31:12 PM
You can use the Windows Scripting Host on ASP as shown below:

<% @Language=VBScript %>
<%
Set WshShell = Server.CreateObject("Wscript.Shell")
cmdRetVal=WshShell.Run("sse45.exe -i k:\o\2.wmv -o k:\o\2.shh -w 128 -df 0
-m 2 -p",0,TRUE)
response.write(cmdRetVal) 'cmdRetVal returns a 0
Set WshShell = Nothing
%>

Hope this Helps.
Imtiaz Hussain.
AddThis Social Bookmark Button