微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

运行带有空格path的参数的问题

我需要运行命令:

certmgr.exe -add MyCert.cer -s -r localMachine trustedpublisher

现在我遇到的问题是,certmgr.exe不在我的path。 我也不想把它添加到我的path。

好的,我当然可以这样做:

set PATH=%PATH%;C:Program Files (x86)Microsoft Visual Studio 11.0

certmgr.exe的path是上面的Microsoft Visual Studio 11.0path。

我如何以编程方式configurationWindows cmd.exe设置?

你如何设置Git-Bash的16种terminal颜色?

为什么不能把cmd.exe可执行文件的选项放在引号中?

cmd批量重命名文件夹/文件

当服务已经在使用Windows批处理脚本运行时,Windows服务无法启动

但我应该能够使用可执行文件的完整path运行该命令。

所以我尝试了以下几点:

>"C:Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe" -add comodo.cer -s -r localMachine trustedpublisher '"C:Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe"' is not recognized as an internal or external command,operable program or batch file. >"......Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe" -add comodo.cer -s -r localMachine trustedpublisher '"......Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe"' is not recognized as an internal or external command,operable program or batch file. >start "C:Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe" -add comodo.cer -s -r localMachine trustedpublisher The system cannot find the file -add. >set THISPROG=C:Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe >%THISPROG% -add comodo.cer -s -r localMachine trustedpublisher 'C:Program' is not recognized as an internal or external command,operable program or batch file. >"%THISPROG%" -add comodo.cer -s -r localMachine trustedpublisher '"C:Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe"' is not recognized as an internal or external command,operable program or batch file.

我如何运行命令:

"C:Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe" -add comodo.cer -s -r localMachine trustedpublisher

而无需将“C: Program Files(x86) Microsoft Visual Studio 11.0添加到我的path中?

如何将所有照片从驱动器复制到闪存驱动器

Windows命令行中的mget命令FTP客户端不会下载文件

查找和replace循环内部

批处理多行到单行?

使用MakeCab.exe&.ddf文件(即使用指令文件)如何指定目标文件名称

尝试这个 …

set THISPROG="C:Program Files (x86)Microsoft Visual Studio 11.0certmgr.exe"

(注意路径附近的"" )

%THISPROG% -add comodo.cer -s -r localMachine trustedpublisher

我似乎无法找到你在我的Visual Studio文件夹中提到的文件,但我只是测试这种格式打开记事本中的文件

在我的测试中,我有一个文件在C:a.txt ,我用…

set AAA="C:WindowsSystem32notepad.exe" %AAA% C:a.txt

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐