2014-10-09 35 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 
相關問題