arcdev / UnblockFiles

remove IZoneIdentifier to unblock downloaded files
MIT License
8 stars 0 forks source link

Administrator privilege required #1

Open rollsch opened 5 years ago

rollsch commented 5 years ago

Administrator privilege seems to be required to call "Remove(filename)" against a file that has "INTERNET" zone.

Eg I have a file that is being opened via outlook with out program, however I cannot unblock it as manually deleting the Zone::Identifier file or using your library both fail.

Any suggestions?

arcdev commented 5 years ago

@rolandh I haven't actually encountered this before... However, this is merely an ADS (alternate data stream) so the file owner should be able to modify the ADS (as well as the file content itself).

Does anyone/anything have the file open at the time you're trying to modify the ADS? (I'm wondering if there's a lock on it.)

Can you rename the file? (trying to diagnose if something has the file locked - if the file cannot be renamed then the file is either locked or the user doesn't have sufficient permissions on the file at all)

When you say "Administrator privilege" are thinking "part of the Administrators group" or "Run as Administrator?"

Also: what version of Windows (Win10 Home, Pro, Enterprise or Server) are you running on?