2014-10-09 33 views
1

这基本上是一个问题。我已经尝试了几种选择:如何从查看ProgramFiles(x86)的命令行启动IIS Express?

iisexpress /path:"C:\ProgramFiles (x86)\PathToMyApp" /port:9000 
iisexpress "/path:C:\ProgramFiles (x86)\PathToMyApp" /port:9000 
iisexpress /path:C:\ProgramFiles^ ^(x86^)\PathToMyApp /port:9000 
iisexpress "/path:C:\ProgramFiles (x86)\PathToMyApp" /port:9000 
iisexpress /path:C:\ProgramFiles%20(x86)\PathToMyApp /port:9000 

并且可能还有一些我只是忘记了。通常,该命令只是在没有任何说明的情况下退出。有一些选项,我得到:

The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 
At line:1 char:38 
+ .\iisexpress /path:%ProgramFiles (x86 <<<<)%\PathToMyApp /port:9000 
    + CategoryInfo   : ObjectNotFound: (x86:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException 

什么是正确的方法来做到这一点?

回答

3

我还没有测试过这个,但是您是否尝试在程序和文件之间放置空间?

iisexpress /path:"C:\Program Files (x86)\PathToMyApp" /port:9000 
+0

棕榈,脸。谢谢你,hysh_00。 – jameslafferty 2014-10-09 14:02:53

2

Hysh_00很有可能在Program Files的空间中碰到头,但我认为有些语言删除了空间。

在PowerShell 3.0中,您可以使用stop-parsing符号来执行此类命令,以阻止PowerShell干扰您的命令行。

iisexpress --% /path:"C:\Program Files (x86)\PathToMyApp" /port:9000 
相关问题