internal static extern Boolean CreateProcess( string lpApplicationName, string lpCommandLine, uint lpProcessAttributes, uint lpThreadAttributes, Boolean bInheritHandles, uint dwCreationFlags, uint lpEnvironment, string lpCurrentDirectory, StartupInfo lpStartupInfo, ProcessInformation lpProcessInformation);
private void ExecuteCommand(string command) { StartupInfo si = new StartupInfo(); ProcessInformation pi = new ProcessInformation(); si.cb = 68; //sizeof(si); try { // Get the directory name StringBuilder sb = new StringBuilder(1024); Helpers.DragQueryFile(m_hDrop, 0, sb, sb.Capacity + 1); string directory = sb.ToString(); if (!Helpers.CreateProcess (null, command, 0, 0, false, 0, 0, directory, si, pi)) { Helpers.MessageBox(0, "Unable to execute : " + command, "Error in ShellCmd.exe", 0); } } catch (Exception e) { Console.WriteLine(e); } }