Link to home
Start Free TrialLog in
Avatar of shadow66
shadow66

asked on

Opening a file via MSDEV command line

I want to be able to open a file in MSDEV using the command line, without getting a new MSDEV app instantiation. This attempt:

"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE" a.txt

Opens a.txt in a new instantiation of MSDEV. I want it to open a.txt in the currently running instantiation.

Thanks for your time.
Avatar of jkr
jkr
Flag of Germany image

If it is a file type registered with msdev.exe (e.g. a .cpp file), you could use

start myfile.cpp
Avatar of shadow66
shadow66

ASKER

What would be the syntax for using "start"? I tried:

"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE" -start my.cpp

but it still launched a new instantiation of MSDEV.
It's just

start.exe my.cpp
What would be the syntax for using "start"? I tried:

"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE" -start my.cpp

but it still launched a new instantiation of MSDEV.
What would be the syntax for using "start"? I tried:

"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE" -start my.cpp

but it still launched a new instantiation of MSDEV.
I see what you're saying. Here's more info:
I'm using an external editor for development. The editor enables me to use command-line hooks to run programs. I want to use such a hook to enable me to switch between the editor and MSDEV (ex: '..\MSDEV %f', where %f is the file currently open in the editor). So, in Windows all source file types are registered with this editor, not MSDEV.
>>So, in Windows all source file types are registered with this editor, not MSDEV

In this case you are out of luck and have to use a DDE conv to make MSDEV load the file...
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I see what you're saying. Here's more info:
I'm using an external editor for development. The editor enables me to use command-line hooks to run programs. I want to use such a hook to enable me to switch between the editor and MSDEV (ex: '..\MSDEV %f', where %f is the file currently open in the editor). So, in Windows all source file types are registered with this editor, not MSDEV.
Thanks jkr, although its a sad commentary on the usability of MSDEV. My external editor provides this capability on the command line, e.g.
insight3.exe -i <filename>

I'm not sure I really want to invest the time to learn how to use DDE conversations. Booo Microsoft.

I doubled your points since it turns out I didn't give you the whole picture up front.
Thank you! :o)
Oh, BTW, let us pop open a virtual bottle of Champaign - this was Question No. 3000 I answered here *poof* .o)