7Zip Extract Only If Password Protected

7Zip Extract Only If Password Protected

I have an application that runs this command:

"C:\Program Files\7-Zip\7z.exe x myArch.zip -aoa -ppassword -odestinationFolder

I want to make sure the application extracts only zip or 7z files that are password protected and were created by me.
Unfortunately, this command extracts archives that have no password, so anyone can extract an archive with my application.
How can I prevent that?

2
James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.