1.

Solve : Bat files & opening programs?

Answer»

Hola mis amigos.
I have run across a problem when it comes to opening a program in a batch file. I would like to open a program that is located in "C:\Program Files\Microsoft Visual STUDIO\COMMON\MSDev98\Bin\MSDEV.EXE"
heres what my batch file looks like now...

@ECHO off
tskill msdev
tskill msdev
START /MAX "C:\Program Files\Microsoft Visual Studio\COMMON\MSDev98\Bin\MSDEV.EXE"

oh and by the way I want those tskills .Quote

I have run across a problem when it comes to opening a program in a batch file

Care to explain. Batch file looks fine. Are you getting any error messages? What HAPPENS when you run the file?



PS. Why kill msdev twice? Once is not enough?Well when it's in " it will just make the Command prompt maximized. But if I don't PUT the " marks then I get Windows cannot find 'c:\Program'. I use two tskills because in Microsoft Visual studio C++ it crashes often and you have to kill the process twice :/. So I want this program so I can just push a key combination and just end the task and bring it back.The quotes are required because the path has embedded spaces. The start command can be quirky....when it sees the quotes it assumes they're the window title. You can get around it by using null title quotes:

Code: [Select]@echo off
tskill msdev
tskill msdev
START "" /MAX "C:\Program Files\Microsoft Visual Studio\COMMON\MSDev98\Bin\MSDEV.EXE"

Good luck. Hey thanks! that worked .


Discussion

No Comment Found