RUN/execute a Command-Line command from an ASP page.

L

Lucas Cowald

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!
 
T

Tohid

Hi,

Have you tried "Shell" function (VB.NET)?

Public Function Shell( _
ByVal Pathname As String, _
Optional ByVal Style As AppWinStyle = AppWinStyle.MinimizedFocus, _
Optional ByVal Wait As Boolean = False, _
Optional ByVal Timeout As Integer = -1 _
) As Integer


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
L

Lucas Cowald

Hi,
Do you know how to do it in ASP/VBscript? I haven't learned .NET, yet.
Thanks,
Lucas
 
L

Lucas Cowald

Hi,
My Script to run a Command-Line from ASP does not work. No errors are
returned either.
It is on IIS. The directory where the script exists is on Drive I:, The
executable .exe is on Drive D:
Do you see any problems with the script below? Can you help me modify it?

<%
Dim objWSS
Const cCMD = "clw45.exe -i k:\o\1.wmv -o k:\o\2.ghh -w 128 -df 0 -m
2 -p"
Set objWSS = CreateObject("WScript.Shell")
objWSS.CurrentDirectory = "D:\Program Files\Program\The Program\"
objWSS.Run "%COMSPEC% /c " & cCMD,,True
%>

Thank you very much for your help.
Lucas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top