Want to use VBScript to run .bat file in a different folder -


i'm trying run .bat file using vbscript. can vbscript work when executed within same folder .bat, however, can't figure out how make run when outside folder.

dim shell set shell = createobject("wscript.shell") shell.run "c:\users\js\desktop\createindex\createindex.bat" 

going out on limb suspect batch script requires own parent folder working directory. can set working directory accordingly changing code this:

set shell = createobject("wscript.shell") shell.currentdirectory = "c:\users\js\desktop\createindex" shell.run "createindex.bat" 

if above doesn't need provide more information should happen , does happen. running external command/script in visible mode , without automatically closing cmd helps debugging:

shell.currentdirectory = "c:\users\js\desktop\createindex" shell.run "cmd /k createindex.bat", 1, true 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -