Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: General » microsoft.public.windows.powershell
Thread: CTP3, new cmdlet Start-Process issue

HTVi
TV Discussion Newsgroups

CTP3, new cmdlet Start-Process issue
Roman Kuzmin <nightroman[ at ]googlemail.com> 12/28/2008 2:19:08 PM
CTP3, new cmdlet Start-Process issue

[Quoted Text]
> Set-Location hkcu:\
> Start-Process notepad
Start-Process : Cannot open file because the current provider
(Microsoft.PowerShell.Core\Registry) cannot open a file.
....

What do you think:

1) it is a bug
2) it is by design because PowerShell (is | will be) able to start
processes "from provider items"
3) other thoughts?
Re: CTP3, new cmdlet Start-Process issue
Shay Levy [MVP] <no[ at ]addre.ss> 12/28/2008 7:36:19 PM
Hi Roman,


Looks like a bug. start-process fails if the current directory is set to
a non FileSystem provider.


---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar: http://tinyurl.com/PSToolbar



RK> CTP3, new cmdlet Start-Process issue
RK>
[Quoted Text]
>> Set-Location hkcu:\
>> Start-Process notepad
RK> Start-Process : Cannot open file because the current provider
RK> (Microsoft.PowerShell.Core\Registry) cannot open a file.
RK> ...
RK> What do you think:
RK>
RK> 1) it is a bug
RK> 2) it is by design because PowerShell (is | will be) able to start
RK> processes "from provider items"
RK> 3) other thoughts?

Re: CTP3, new cmdlet Start-Process issue
Roman Kuzmin <nightroman[ at ]googlemail.com> 12/28/2008 11:35:04 PM
Submitted as a bug
https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=389860&SiteID=99
Re: CTP3, new cmdlet Start-Process issue
Thomas Lee <tfl[ at ]psp.co.uk> 12/29/2008 5:01:18 PM
In message
<ef1c338c-9a0b-426a-8d3c-094cad064bd7[ at ]a29g2000pra.googlegroups.com>,
Roman Kuzmin <nightroman[ at ]googlemail.com> writes
[Quoted Text]
>CTP3, new cmdlet Start-Process issue
>
>> Set-Location hkcu:\
>> Start-Process notepad
>Start-Process : Cannot open file because the current provider
>(Microsoft.PowerShell.Core\Registry) cannot open a file.
>...
>
>What do you think:
>
>1) it is a bug

Yes.

>2) it is by design because PowerShell (is | will be) able to start
>processes "from provider items"

I doubt it.
>3) other thoughts?
I see the bug is filed - I've validated it (it fails as predicted).
Let's see what MS says!

Thomas

--
Thomas Lee
doctordns[ at ]gmail.com
Re: CTP3, new cmdlet Start-Process issue
bluefin <desertcamel.chen[ at ]gmail.com> 12/29/2008 11:15:31 PM
[Quoted Text]
> Set-Location hkcu:\ <----- this is alright
> Start-Process notepad <----- because registry environment is prohibited to allow any temporary storage ?




On Dec 28, 10:19 pm, Roman Kuzmin <nightro...[ at ]googlemail.com> wrote:
> CTP3, new cmdlet Start-Process issue
>
> > Set-Location hkcu:\
> > Start-Process notepad
>
> Start-Process : Cannot open file because the current provider
> (Microsoft.PowerShell.Core\Registry) cannot open a file.
> ...
>
> What do you think:
>
> 1) it is a bug
> 2) it is by design because PowerShell (is | will be) able to start
> processes "from provider items"
> 3) other thoughts?

Re: CTP3, new cmdlet Start-Process issue
"Josh Einstein" <josheinstein[ at ]hotmail.com> 12/30/2008 3:20:27 PM
Personally, the purist in me is not too fond of the fact that Start-Process
is even taking the PATH environment variable into consideration. I've always
found the use of PATH to be asking for trouble and in this case, it's
behavior specific to Start-Process, there's nothing about Cmdlets that
suggest any particular parameter should be qualified by the PATH environment
variable. If you're using Start-Process instead of invoking the exe directly
at the command prompt, then you're obviously doing something more specific
and you should know where the exe is located.

But having said that, if it works from the FileSystem provider, it would be
more intuitive if it worked from any other provider since the idea of the
PATH environment variable is to allow a name to be resolved regardless of
$PWD. Not to mention, since it uses ShellExecute or CreateProcess and both
of them only work on files, it seems perfectly acceptable to restrict
Start-Process to the file system.

Josh Einstein

"Roman Kuzmin" <nightroman[ at ]googlemail.com> wrote in message
news:ef1c338c-9a0b-426a-8d3c-094cad064bd7[ at ]a29g2000pra.googlegroups.com...
[Quoted Text]
> CTP3, new cmdlet Start-Process issue
>
>> Set-Location hkcu:\
>> Start-Process notepad
> Start-Process : Cannot open file because the current provider
> (Microsoft.PowerShell.Core\Registry) cannot open a file.
> ...
>
> What do you think:
>
> 1) it is a bug
> 2) it is by design because PowerShell (is | will be) able to start
> processes "from provider items"
> 3) other thoughts?

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen