Execute .vbs files?

Specific support for Deluge on Microsoft Windows OS
Post Reply
aceallways
New User
New User
Posts: 3
Joined: Wed Dec 03, 2014 11:17 pm

Execute .vbs files?

Post by aceallways »

Hi guys,

So I finally got Execute working with .bat files, but I want no command window so I was going to have a .vbs pass the parameters on to a .bat.

This is my vbs file:

Code: Select all

Set oShell = CreateObject ("Wscript.Shell") 
Set args = WScript.Arguments
Dim strArgs
Dim path
path = """C:\Program Files (x86)\Deluge\test.bat"""
strArgs = path&" "&args(0)&" "&args(1)&" "&args(2)
WScript.Echo(strArgs)
oShell.Run strArgs, 0, false
For some reason there is no result though. I have the Echo in there so I would be able to tell if the vbs was running, nothing ever shows up.

Does Execute not support vbs for some reason?
Last edited by Cas on Thu Dec 04, 2014 10:10 am, edited 1 time in total.
Reason: Use code tags
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Execute .vbs files?

Post by Cas »

It's not possible with vbs because it need to be called with `cscript`. However one workaround would be to convert it to an exe file: http://www.f2ko.de/programs.php?lang=en&pid=ov2e (On Windows 8 you will need to unblock the exe in properties.)
Post Reply