在任务管理器上隐藏“Python”

2024-05-08 10:56:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我有python程序,这是编译文件(.pyc) 我用C#编写了Launcher。这个启动器启动这个Python程序(pyc文件)。 但正如您在图中看到的,我的python程序的顶级名称是“python”,如何隐藏此python? 谢谢 C#启动python代码:

 private bool ProcessCalistir(string path, string Args = "", bool wait = false)
    {
        Process proc = new Process();
        //proc.StartInfo.WorkingDirectory = PythonKlasor;
        proc.StartInfo.WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory;
        proc.StartInfo.FileName = path;
        proc.StartInfo.Arguments = Args;
        proc.StartInfo.UseShellExecute = false;
        proc.StartInfo.CreateNoWindow = true;
        proc.StartInfo.Verb = "runas";
        proc.Start();
        if (wait) proc.WaitForExit();
        return true;
    }

ProcessCalistir(“python.exe”、“MyPythonProgram.pyc”)

enter image description here


Tags: 文件path程序falsetruestringargsproc

热门问题