如何从文件夹运行命令行? [英] How to run a command line from a folder?

查看:83
本文介绍了如何从文件夹运行命令行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我卸载vs 2016因为它减慢了我的整个操作系统!!!

所以,我安装了我可信赖的VS 2010,但安装后,它抛出错误Exception已被目标抛出调用。

因为我安装了比2010更新版本的VS ...



经过一段时间的搜索,发誓和吐痰,我发现这个问题的解决方案是:一些[路径变量]超过2048个字符 - 但他们没有指定在哪里找到这个变量文件。



在互联网上搜索这个[路径变量]的东西,我在一个可能的解决方案中找到了这个解释:......我运行了以下命令在cmd行,来自C:\Program Files(x86)\ Microsoft Visual Studio 10.0 \Common7 \IDE文件夹:...



现在,从它描述的内容来看,他正在从文件夹运行命令,对吧?

- 如何从文件夹运行命令行? (哭)



再次,谢谢。



我尝试了什么:



_____________________________________i描述了我的尝试。

I Uninstalled vs 2016 because it slowed down my entire OS !!!
So, I installed back my trusty VS 2010 but after install, it throw error "Exception has been thrown by the target of an invocation".
Because I installed a newer version of VS than the 2010...

After some time of searching,swearing and spitting, I find that the solution for this problem is: "some [path variable] being longer than 2048 chars" - but they are not specifying where to find this "variable" FILE.

Searching for this [path variable] thing on the internet, I find this "explanation" in a possible solution: """...I ran the following command on cmd line, from the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE folder:..."""

Now, from what it is describing, he is running a command from a folder, right?
- How to run a command line from a folder? (crying)

Again, thank you.

What I have tried:

_____________________________________i described what i tried.

推荐答案

要运行命令提示符,请按住Windows键,然后按R。在文本框中键入cmd,然后按ENTER键。

当您运行命令提示符时,它有一个当前目录 - 这通常默认为C:\ Users \YourUser和显示在文本光标的左侧。



要从特定文件夹运行命令,您可以执行以下两项操作之一:

1)在命令行中指定文件夹:

To run a command prompt, hold the Windows key, and press "R". Type "cmd" in the textbox, and press ENTER.
When you run a command prompt, it has a "current directory" - this normally defaults to "C:\Users\YourUser" and is shown to the left of the text cursor.

To run a command from a specific folder, you can do one of two things:
1) Specify the folder in the command line:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MyAppName" parameters

- 不要忘记双引号,因为它们强制命令处理器将其视为完整路径,而不是在第一个空格处停止。

2)移动首先使用CD到文件夹:

- do not forget the double quotes, as they force the command processor to treat it as a complete path, rather than stopping at the first space.
2) Move to the folder first using CD:

cd "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"

然后运行你的申请:

Then run your application:

myAppName parameters


这篇关于如何从文件夹运行命令行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆