Batch start of multiple programs

  • Thread starter Thread starter TCEBob
  • Start date Start date
T

TCEBob

Whenever I start IE I also want to start AdSubtract. Here is what I've come up
with:

start /b "C:\Program Files\AdSubtract\AdSub.exe"
"C:\Program Files\Internet Explorer\iexplore.exe"

Doesn't work.

How can I do this?

rs
 
---go.vbs--cut here---
set shell=createobject("wscript.shell")
shell.run "C:\Program Files\AdSubtract\AdSub.exe" , 0
shell.run "C:\Program Files\Internet Explorer\iexplore.exe" . 1
--cut here--
 
Hi, Mark, I'm back! Since I have no experience with vbs to date I need a little
help. Here's the file:

set shell=createobject("wscript.shell")
shell.run "C:\Program Files\AdSubtract\AdSub.exe" , 0
shell.run "C:\Program Files\Internet Explorer\iexplore.exe" , 1

(I changed . 1 to , 1. Ok?)

Here's the error comment

Script: c:\Program Files\Miscellaneous\go.vbs
Line: 2
Char: 1
Error: The system cannot find the file specified.
Code: 80070002

Source: (null)

I double checked the paths and all is kosher.

Any thoughts?

rs
 
set shell=createobject("wscript.shell")
shell.run """C:\Program Files\AdSubtract\AdSub.exe""" , 0
shell.run """C:\Program Files\Internet Explorer\iexplore.exe""" , 1

I failed to remember the escape charters to run a commmand that has spaces
in the folder names

not ", but """ instead.

I also missed your original syntax error in the batch file

start /b "AdSubtract Window Title Here" "C:\Program
Files\AdSubtract\AdSub.exe"
start "My IE Title Here" "C:\Program Files\Internet Explorer\iexplore.exe"

( I don't know when they added the title arg either<g>)
 
No prob, glad to do it. This might get you going in Windows Script Host

http://msdn.microsoft.com/library/en-us/script56/html/wsoriWindowsScriptHost.asp?frame=true
http://msdn.microsoft.com/library/en-us/script56/html/vtoriVBScriptFundamentals.asp?frame=true

There are Windows Script Host objects, which have functions, and VBScript
can also create functions of your own, and all can run in *.vbs (vbscript
file), or *.WSF (Script Host) files, each with their own syntax. The <*tags>
of XML might throw you at first, but the examples will get you going.
 
shell.run chr(34) & "C:\Program Files\AdSubtract\AdSub.exe" & chr(34) , 0

chr(34) is the quote character.
 
Thanks David, script is cool.<g>


"David Candy" <.> wrote in message
shell.run chr(34) & "C:\Program Files\AdSubtract\AdSub.exe" & chr(34) , 0

chr(34) is the quote character.
 
Back
Top