powershell 0x80004005 error when extracting files with password

1

I am trying to extract some password protected file using powershell

(new-object -com shell.application).namespace("C:\Downloads").CopyHere((new-object -com shell.application).namespace("C:\Downloads\pathzip.zip").Items(),16)

I get an error Error 0x80004005 unspecified error.

This error only happens when I try to unzip files that are password protected. I've looked online and this indeed seem to be an "Access denied" error.

I'd like that powershell pops a modal dialog and asks me to type password in, instead of just throwing an error and giving up. Can this be done using powershell?

windows
powershell
asked on Stack Overflow Oct 6, 2018 by sanjihan • edited Oct 6, 2018 by sanjihan

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0