Powershell error trying to call 7zip using start-process

Mar 18, 2013 at 4:21 PM
You are using incompatible arguments for the start-process cmdlet.

You cannot use redirection and a window style of hidden at the same time.

This makes the script crash.
Mar 18, 2013 at 4:35 PM
Hi stecy,
it works fine with my environment. I am aware of the fact that
Get-Command -syntax Start-Process
depicts two cases where window style is not present in binding with redirect but anyway I can not find any explicit warning about the incompatibility of those parameters: http://technet.microsoft.com/en-us/library/hh849848.aspx
Mar 18, 2013 at 4:36 PM
I have windows 7 64 bits and powershell 2.0

What do you have?
Mar 18, 2013 at 4:42 PM
I'm on Windows 7 64 bits too.
Powershell ver is 3.0
Mar 18, 2013 at 8:57 PM
I installed PowerShell version 3.0 and now it works fine.
Aug 9, 2013 at 6:10 PM
I too got caught by that, had to install Management Framework/Powershell3 on two fresh-and-patched, Win 7-SP1, x86.
Oct 25, 2013 at 12:23 PM
For various reasons had to change the call of 7zip to the "old" fashioned batch file. Start-Process with redirection of standard output, can't handle exit codes from 7Zip and in some circumstances 7zip hangs with the redirection buffer full.