views:

79

answers:

2

I want to specify a project to be opened when I launch Delphi(D2010).

Is there a command-line parameter to pass to bds.exe, like the -r option allowing to load a specific Registry Setting, where I could pass the name of the project I want to open when launching bds.exe?

The only options I know of are:

-ns  "no splash"      
-np  "no project"   
-hm  "Heap Monitor"  
-attach "attach to process(JIT)"  
-r    "registry root"  
-p    "Personalities"  
+5  A: 

Just add the path after your command.

"{path to rad studio}\bin\bds.exe" -pDelphi "C:\Projects\TestProj\TestProj.dproj"

BTW: here is the IDE Command Line Reference.

ulrichb
Hmm. I'm pretty that's what I tried and it did not work... Anyway, I retried after your answer and it was exactly what I wanted! (must have mistyped or goofed with the quotes). Thanks also for the link.
François
A: 

Sounds to me that instead of launching Delphi, you should just double-click the project file. The OS will start Delphi for you, and Delphi will open the project automatically. Make a shortcut to it on your desktop or in your Start menu for easy access.

In Delphi 7 and earlier, use the DPR file. For later versions, use the DPROJ or BDSPROJ file instead.

Works for project groups, too.

Rob Kennedy
Thanks Rob, but I need to do it with a parameter. No UI available nor even ShellExecute.
François