c#通过total commander打开c:\Windows\system32中的文件夹

c#通过total commander打开c:\Windows\system32中的文件夹,c#,directory,system,total-commander,C#,Directory,System,Total Commander,我在使用total commander打开windows系统文件夹时遇到一点问题 当我在cmd中手动运行该命令时,它是正常的,但当它作为ProcessStartInfo运行时则不是。 此问题发生在Windows XP上,Windows 7参数(路径)略有不同,但仍在工作 ProcessStartInfo startInfo = new ProcessStartInfo(); //New Proccess startInfo.Arguments =

我在使用total commander打开windows系统文件夹时遇到一点问题 当我在cmd中手动运行该命令时,它是正常的,但当它作为ProcessStartInfo运行时则不是。 此问题发生在Windows XP上,Windows 7参数(路径)略有不同,但仍在工作

            ProcessStartInfo startInfo = new ProcessStartInfo(); //New Proccess
            startInfo.Arguments = "/L=" + GetArgument(); //Return C:\WINDOWS\system32\config\systemprofile\Local Settings\Application ata\MyApp\update\download [it´s OK]
            startInfo.WorkingDirectory = Path.GetDirectoryName(GetTcmdPath());
            startInfo.FileName = GetTcmdPath(); //returns C:\Program Files\totalcmd\TOTALCMD.EXE [it´s OK]
            Process.Start(startInfo); //Start proccess 
TC已启动,但路径为:C:\WINDOWS\system32\config\systemprofile,不知道为什么 有人能帮我吗

编辑:当我在cmd
C:\Program Files\totalcmd>totalcmd.EXE/L=C:\WINDOWS\system32\config\systemprofile\Local Settings\Application Data\MyApp\update\download中运行时,不带

反而

C:\Program Files\totalcmd>totalcmd.EXE/L=“C:\WINDOWS\system32\config\systemprofile\Local Settings\Application Data\MyApp\update\download”


它不起作用,但不知道如何在程序中添加

我找到了我问题的答案,因此如果您需要在字符串变量中添加双引号,请使用类似以下内容:

startInfo.Arguments=string.Format(“/L=\“{0}\”,GetArgument())