-1

I'm writing a piece of powershell code to wrap the 7z.exe command line utility. Let's say I have a list of 7z archives and I want to pass the default password to 7z.exe if the archive is password protected and does not pass the password if it's not password protected. I need to way to find whether the 7z archive need a password. How to do that? Thank you.

Just a learner
  • 26,690
  • 50
  • 155
  • 234

1 Answers1

2

It's not error to specify a password for unprotected archives. So, just pass it for every archive.

Tekno Sal
  • 97
  • 4