-
c#에서 chrome.exe --remote-debugging-port=9222 --user-data-dir="c:/ChromeTEMP" CMD명령 하도록 코드 보여줘프로그램(C# etc.) 2023. 2. 3. 17:57
다음은 C#에서 "chrome.exe --remote-debugging-port=9222 --user-data-dir="c:/ChromeTEMP" 명령을 실행할 수 있는 방법의 예입니다.
using System; using System.Diagnostics; namespace ChromeCommandExample { class Program { static void Main(string[] args) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "chrome.exe"; startInfo.Arguments = "--remote-debugging-port=9222 --user-data-dir=\"c:/ChromeTEMP\""; try { using (Process process = Process.Start(startInfo)) { Console.WriteLine("Chrome started successfully with the following command: {0} {1}", startInfo.FileName, startInfo.Arguments); } } catch (Exception ex) { Console.WriteLine("Error starting Chrome: {0}", ex.Message); } } } }
'프로그램(C# etc.)' 카테고리의 다른 글
동일한 이미지를 빠르게 식별하는 알고리즘 feat.c# code (0) 2023.02.28 _ConnectionPtr 이 뭔지 알아? (0) 2023.02.10 창최소화 이벤트 코드 (0) 2023.01.16 this.ShowInTaskbar = true; 이후에 포커싱 주는 코드 (0) 2023.01.16 프로그램 종료시 트레이 아이콘도 같이 삭제되도록하는 코드 (0) 2023.01.16