{"id":17008705,"url":"https://github.com/i-e-b/runprocess","last_synced_at":"2025-04-12T07:38:13.089Z","repository":{"id":6930538,"uuid":"8181746","full_name":"i-e-b/RunProcess","owner":"i-e-b","description":"Replacement for System.Diagnostics.Process","archived":false,"fork":false,"pushed_at":"2021-07-16T10:13:48.000Z","size":209,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T02:51:09.724Z","etag":null,"topics":["c-sharp","processes","win32","working"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/i-e-b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-13T15:33:49.000Z","updated_at":"2023-08-30T12:35:15.000Z","dependencies_parsed_at":"2022-09-13T11:40:46.439Z","dependency_job_id":null,"html_url":"https://github.com/i-e-b/RunProcess","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FRunProcess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FRunProcess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FRunProcess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FRunProcess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i-e-b","download_url":"https://codeload.github.com/i-e-b/RunProcess/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248536119,"owners_count":21120681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","processes","win32","working"],"created_at":"2024-10-14T05:29:03.621Z","updated_at":"2025-04-12T07:38:13.066Z","avatar_url":"https://github.com/i-e-b.png","language":"C#","readme":"RunProcess\n==========\n\nA process host for Windows (Vista and later) that is more reliable and flexible than `System.Diagnostics.Process`\n\nAllows run-time reading from std error and output, and writing to std input.\n\nThe .Net Standard build has a few less features, but will fall-back to `System.Diagnostics.Process` on non-Windows systems.\n\nUsage\n-----\nLike this\n```csharp\nusing (var proc = new ProcessHost(\"my.exe\", @\"C:\\temp\\\")) {\n    proc.Start();\n}\n```\n\nOr,\n```csharp\nusing (var proc = new ProcessHost(msBuildExe, projectDir)) {\n    proc.Start(projectFile + \" /t:Publish\");\n        \n    int resultCode;\n    if (!proc.WaitForExit(TimeSpan.FromMinutes(1), out resultCode))\n    {\n        proc.Kill();\n        throw new Exception(\"Publish killed -- took too long\");\n    }\n\n    File.AppendAllText(logFile, proc.StdOut.ReadAllText(Encoding.UTF8));\n    File.AppendAllText(logFile, proc.StdErr.ReadAllText(Encoding.UTF8));\n\n    if (resultCode != 0)\n    {\n        throw new Exception(\"Publish failure: see \\\"\" + logFile + \"\\\" for details\");\n    }\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-e-b%2Frunprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi-e-b%2Frunprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-e-b%2Frunprocess/lists"}