无法在命令行中修改Visual Studio配置

发布于 2025-02-13 07:50:24 字数 706 浏览 1 评论 0原文

我正在尝试开发一个脚本来自动安装DFIR-ORC和Visual Studio。我已经使用以下内容通过命令行安装了Visual Studio:

.\vs_Community(1).exe --addProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --wait --quiet

现在,我想从DFIR-ORC回购中使用.VSCONFIG修改配置。因此,我使用以下commmand:

.\vs_Community(1).exe modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\" --config ".\vsconfig"

但是我有一个错误说:未知中的“ env”选项。如果可以提供帮助,您将在此处找到.vsconfig文件的内容: https://github.com/dfir-orc/dfir-orc/blob/main/.vsconfig

您有任何想法吗? 谢谢 !

I am trying to developp a script to automate the installation of DFIR-ORC and Visual Studio. I already installed Visual Studio by command-line using the following:

.\vs_Community(1).exe --addProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --wait --quiet

Now I want to modify the configuration with .vsconfig from the dfir-orc repo. So I use the following commmand:

.\vs_Community(1).exe modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\" --config ".\vsconfig"

But I have an error saying: The 'env' option in unknown. If it can help, you'll find the content of the .vsconfig file here: https://github.com/DFIR-ORC/dfir-orc/blob/main/.vsconfig

Do you have any idea ?
Thanks !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

机场等船 2025-02-20 07:50:24

我找到了解决方案。以防万一有人遇到同样的问题:
这实际上与报价和路径有关。就我而言,我只是修改代码以使用变量来存储路径。它只是要提高响应速度,但它纠正了问题(看起来因为它不会将其存储在带有“”字符串中)。

这是代码:

$currPath = $PWD.path + "\.vsconfig"

.\vs_community.exe --config $currPath --wait

I found the solution. Just in case someone is having the same issue:
This is actually related with the quotes and the path. In my case, I just modify my code to use a variable to store the path. It was just to be more responsive, but it corrected the issue (Looks like because it does not store it in a string with "").

Here's the code:

$currPath = $PWD.path + "\.vsconfig"

.\vs_community.exe --config $currPath --wait
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文