Thanks for reply
I'm using Vs2002 .net framvwork sp3
Really I need to rerun my exe
(in shellexecute i had compiling problem so
viewing helps
I use that:
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset( &pi, 0, sizeof(PROCESS_INFORMATION) );
memset(&si, 0, sizeof(STARTUPINFO));
si.cb= sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWNA ;
si.lpDesktop = "";
CreateProcess( NULL,
Assembly::GetExecutingAssembly()->Location,
NULL,
NULL,
FALSE,
NORMAL_PRIORITY_CLASS,
NULL,
NULL,
&si,
&pi );
and i receive the following error
unable to convert parameter 2 from system::string__gc* to LPSTR
If i Put in the second parameter (char*))"progpath and name" all works!!
If i run
Console::writeline(S"location{0{ =
",Assembly::GetExecutingAssembly()->Location
I view the correct path
That's a conversion Problem i thing but i don't Know how to solve
thanks best
regards
Nishant Sivakumar said:
To run an app, look at ShellExecute
To get the path of the running executable, see GetModuleFileName
--
Regards,
Nish [VC++ MVP]
DavideR said:
How to launch a exe in a vc++ 2002 program?
What is the equivalent of vb6's app.path?
How can i get the exe name?
Thanks
davide