.Bat that runs .VBS

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Batch Artist
Posts: 22
Joined: 18 Oct 2013 05:28

.Bat that runs .VBS

#1 Post by Batch Artist » 23 Oct 2013 03:55

Hello guys, I just needed a little bit of help. I was wondering if it was possible that a Batch file could start a .VBS file when I give the command to in the batch. I'm just experimenting with my knowledge of batch and seeing where I can improve on my coding skills.

Thanks in advance to all!

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: .Bat that runs .VBS

#2 Post by foxidrive » 23 Oct 2013 06:09

Here are two methods. The second one requires that the .VBS filespec is associated already.


Code: Select all

@echo off
cscript /nologo "c:\folder\filename.vbs"


Code: Select all

@echo off
start "" "c:\folder\filename.vbs"

Batch Artist
Posts: 22
Joined: 18 Oct 2013 05:28

Re: .Bat that runs .VBS

#3 Post by Batch Artist » 23 Oct 2013 07:08

foxidrive wrote:Here are two methods. The second one requires that the .VBS filespec is associated already.


Code: Select all

@echo off
cscript /nologo "c:\folder\filename.vbs"


Code: Select all

@echo off
start "" "c:\folder\filename.vbs"


Thanks again Foxidrive! Like usual your codes worked like charms! Thank you very much!

Post Reply