2012-04-13 54 views
3

打开目录,我经常使用Powershell的调用,项目不再工作在资源管理器

ii . 

在PowerShell中在Windows资源管理器打开当前目录。这曾经一直工作,但现在没有任何反应。

Invoke-Item小命令仍然有效。做ii somefile.txt在文本编辑器中打开该文件。但目录不再工作了。

此外start .不起作用。使用explorer .确实有效。

运行

Trace-Command -Name ParameterBinding {ii .} -PSHost 

回报

DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Invoke-Item] 
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Invoke-Item] 
DEBUG: ParameterBinding Information: 0 :  BIND arg [.] to parameter [Path] 
DEBUG: ParameterBinding Information: 0 :   Binding collection parameter Path: argument type [String], parameter type [System.String[]], 
collection type Array, element type [System.String], no coerceElementType 
DEBUG: ParameterBinding Information: 0 :   Creating array with element type [System.String] and 1 elements 
DEBUG: ParameterBinding Information: 0 :   Argument type String is not IList, treating this as scalar 
DEBUG: ParameterBinding Information: 0 :   Adding scalar element of type String to array position 0 
DEBUG: ParameterBinding Information: 0 :   BIND arg [System.String[]] to param [Path] SUCCESSFUL 
DEBUG: ParameterBinding Information: 0 : BIND cmd line args to DYNAMIC parameters. 
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Invoke-Item] 
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing 
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing 

运行

Trace-Command -Name CommandDiscovery {ii .} -PSHost 

回报

DEBUG: CommandDiscovery Information: 0 : Looking up command: ii 
DEBUG: CommandDiscovery Information: 0 : Alias found: ii Invoke-Item 
DEBUG: CommandDiscovery Information: 0 : Cmdlet found: Invoke-Item Microsoft.PowerShell.Commands.InvokeItemCommand, 
Microsoft.PowerShell.Commands.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 

我想也许有一个文件关联问题或什么的。但我找不出什么Invoke-Item实际上是调用或如何改变它。

我怎样才能得到这个工作了?

+0

是否'$ II仍然pwd'工作? – 2012-04-13 13:05:04

+0

还有一个标准问题 - 您是否尝试过关闭电脑? :) – 2012-04-13 13:05:35

+0

@Shedal'ii $ pwd'不起作用。 – 2012-04-13 13:10:10

回答

2

这是非常艰难的弄清楚到底为什么它可能不会为你工作了,但为什么不使用替代这是在PowerShell和CMD相同:

start . 

explorer .作品太)

如果ii .是很重要的,然后尝试重新启动PowerShell控制台和/或计算机。也可以尝试做ii . -whatif,看看你是否知道为什么它不工作了。

+0

通常是开始进程的别名吗? – 2012-04-13 13:08:36

+0

@Christian - 你问我,因为我说它在cmd中是一样的吗?你输入的命令是相同的,但不是它们实际上是什么。是的,启动是Powershell中启动进程的别名。 – manojlds 2012-04-13 13:09:33

+0

“开始”也不起作用。 '探险家。如果它归结为它我可以使用它,但我更喜欢'ii'的一致性。 – 2012-04-13 13:11:05

相关问题