private static StartupInfo CreateStartupInfo(string exe, string[] args, bool isHidden, out string command)
        {
            var startupInfo = new StartupInfo();

            startupInfo.Flags &= USE_STD_HANDLES;
            startupInfo.StdOutput = (IntPtr) STD_OUTPUT_HANDLE;
            startupInfo.StdError = (IntPtr) STD_ERROR_HANDLE;

            if (isHidden)
            {
                startupInfo.ShowWindow = 0;
                startupInfo.Flags = STARTF_USESHOWWINDOW;
            }

            command = CreateArguments(exe, args);

            return startupInfo;
        }