Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Let's say we have a hello.zip archive containing a hello.ps1 file. My question isn't specific to PowerShell, I'm merely using a PowerShell script as an example.

  1. Upload hello.zip to a server.
  2. Download hello.zip
  3. Recent versions of Windows will mark the file as unsafe and block it (right-click -> Properties.

If I now uncompress hello.zip from the shell (right-click -> Extract All... or similar), the extracted files will carry over the blocking. If, however, the extraction happens from the command line, the uncompressed files will be unblocked.

In the case of the script above —with a RemoteSigned execution policy in place for PowerShell—, in the first case the script will be unable to run, whilst in the second it will execute normally.

I would like to understand why the blocking works differently depending on how the archive is uncompressed.

share|improve this question

closed as not constructive by Linker3000, Nifle, MaQleod, Renan, Dennis Jul 15 '12 at 4:35

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

It's possible that you found a bug.

But it most likely is "by design" since so much uncompressing goes on by command line in the background and during installations of some apps, that having those blocked, too, could lead to problems for the uninitiated and wasted time for the initiated. Certainly administrators would not want to deal with it, and normal users would not be using a command line to open them in the first place.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.