Trying to launch a Visual Studio C# program from inside another one -
i having great difficulty getting windows program, written in vs 2008 c#, launch type program. i've put main program offer ability launch other vs 2008 c# programs. when 1 of them selected following code intended launch:
system.diagnostics.process.start(@"c:\documents , settings\rat\my documents\visual studio 2008\projects\pv_002_082708\pv_001\pv_001\bin\debug\pv.exe");
it works, each user have different path. path shown computer. code have know each persons program installed! in past, call program in c:\program files location because that's ms package & deployment program put programs. vs 2008/2010 doesn't put them there!
i'm sure not knowledgeable visual studio 2008/2010 know if there way around this, appreciated.
system.diagnostics.process.start(system.io.path.combine(system.windows.forms.application.startuppath, "pv.exe")); assuming program in launched application's path.
or...
system.diagnostics.process.start(system.io.path.combine(system.environment.getfolderpath(system.environment.specialfolder.mydocuments), @"visual studio 2008\projects\pv_002_082708\pv_001\pv_001\bin\debug\pv.exe")); assuming want open project it's place.
Comments
Post a Comment