Launching A Web Page In A Browser

System::Diagnostics::Process::Start("http://www.ibexuk.com");

Opening file in Notepad


	using namespace System::Diagnostics;

	ProcessStartInfo ^startInfo = gcnew ProcessStartInfo();
	startInfo->FileName = "C:\\Windows\\notepad.exe";
	startInfo->Arguments = "\"" + Path::GetDirectoryName(Application::ExecutablePath) + "\\SomeDocName.Config\"";
	Process::Start(startInfo);

Launching Another Application From C++


using namespace System::Diagnostics;
	Process::Start("C:\\GVNVR\\ViewLog500.exe");

	//or
	System::Diagnostics::Process::Start("C:\\GVNVR\\ViewLog500.exe");
If you need to pass arguments then use

	ProcessStartInfo ^startInfo = gcnew ProcessStartInfo();
	startInfo->FileName = "C:\\Program Files\\IndigoVision\\Control Center\\ControlCenter.exe";
	startInfo->Arguments = "-username adampulley -video_display_mode video_panes_only";
	Process::Start(startInfo);

Also see:
Shell Execute

Launching and Closing Another Application From C++

Create Class

	Process^ MyProcess;
Open Ap

	MyProcess = gcnew Process();
	MyProcess->StartInfo->FileName = "C:\\Program Files\\IndigoVision\\ControlCenter.exe";
	MyProcess->StartInfo->Arguments = "-username adampulley -video_display_mode video_panes_only";
	MyProcess->Start();
Close Ap

	if (MyProcess != nullptr)
	{
		if (!MyProcess->HasExited)
			MyProcess->CloseMainWindow();
		MyProcess = nullptr;
	}

Other resources for fingding and closing other aps:
http://support.microsoft.com/kb/307395

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.