0

i have a file in a network directory and this file it's been previously copied, and i want to operate with this file. But, in Windows Xp, the file have this security protection / block:

(sorry it's in italian)

security

I want to programmatically remove this security protection in C#.

Thanks in advance!

M.

mattpltt
  • 333
  • 1
  • 4
  • 18
  • Is the protection not there for a reason? – Paul C Sep 22 '11 at 12:45
  • The protection is there because the file is from another computer. But i want to use the file, that it's seems locked. – mattpltt Sep 22 '11 at 12:51
  • possible duplicate of [Unblock File from within .net 4 c#](http://stackoverflow.com/questions/6374673/unblock-file-from-within-net-4-c) – Chris J Sep 22 '11 at 12:53
  • 1
    Also see http://stackoverflow.com/questions/1617509/unblock-a-file-with-powershell (I know this is powershell, but provides a bit more background which might also help). – Chris J Sep 22 '11 at 12:55

1 Answers1

1

Open this file for write yourfile.exe:Zone.Identifier and close it, so it gets emptyed.

Andrey
  • 59,039
  • 12
  • 119
  • 163