Jump to content

Running Switch Command Line from VBScript


convey2web

Recommended Posts

Hi,

 

I am trying to run the switch program from a vbscript and it is not converting the file correctly.

 

First I tested the command line script and it works perfectly when I run it from the dos command.

 

E:\Switch\switch.exe -hide -convert "E:\sound\sound.mp3" -format M4A -outfolder "E:\sound\new"

 

Next I put the command into a batch file and that worked there as well.

 

Finally, I wrote a basic vbscript (below) and ran it in an ASP page and the file comes out as a mp3 versus the m4p

 

<%

set wshell = CreateObject("WScript.Shell")

wshell.run "e:\vbscript.bat"

set wshell = nothing

%>

 

Any help or advise would be great. Thanks

Link to comment
Share on other sites

  • 4 weeks later...

You can try Process instead of Shell, it will work smoothly.

 

 

 

 

Hi,

 

I am trying to run the switch program from a vbscript and it is not converting the file correctly.

 

First I tested the command line script and it works perfectly when I run it from the dos command.

 

E:\Switch\switch.exe -hide -convert "E:\sound\sound.mp3" -format M4A -outfolder "E:\sound\new"

 

Next I put the command into a batch file and that worked there as well.

 

Finally, I wrote a basic vbscript (below) and ran it in an ASP page and the file comes out as a mp3 versus the m4p

 

<%

set wshell = CreateObject("WScript.Shell")

wshell.run "e:\vbscript.bat"

set wshell = nothing

%>

 

Any help or advise would be great. Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...