Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XP - Blocked file
Message
From
14/11/2008 13:26:26
 
 
General information
Forum:
Windows
Category:
Security
Miscellaneous
Thread ID:
01361699
Message ID:
01361966
Views:
12
>>>Hi,
>>>
>>>When I receive an XML attachment via Email and save it to a file the file is 'blocked'.
>>>If, for example, I open it in IE then I see the nested XML tags but cannot expand/collapse the nodes.
>>>If I look at the properties of the file in question at the bottom of the 'General' page it states:
>>>"This file came from another computer and might be blocked to help protect this computer"
>>>
>>>Question: How to "Unblock" such a file programatically ?
>>>
>>>TIA
>>>Viv
>>___
>>Viv,
>>
>>Some pointers - I haven't tested any of them, nor have I figured it out
>>
>>But the Zip/delete/Unzip [ I have tested it with success ] is imo the simplest means - especially since it's only an xml file
>>
>>As I see it, it's the Zone.Identifier info in the 'alternate data streams' of the file (http://blogs.msdn.com/powershell/archive/2007/03/07/how-does-the-remotesigned-execution-policy-work.aspx)
>>
>>Look at the xml and below -
>>http://thepowershellguy.com/blogs/posh/archive/2007/01/27/powershell-accessing-alternative-data-streams-of-files-on-an-ntfs-volume.aspx
>>
>>
>>
>>[ http://support.microsoft.com/kb/883260/
>>http://msdn.microsoft.com/en-us/library/system.management.automation.verbssecurity.unblock(VS.85).aspx
>>]
>>
>>http://weblogs.asp.net/kennykerr/archive/2008/09/12/visual-c-in-short-unblock-downloaded-applications.aspx
>>
>>This one is funny: http://blogs.msdn.com/toddha/archive/2008/06/26/faster-way-to-unblock-files-in-explorer.aspx
>>Zip the files, delete them and unzip them again
>>
>>
>>This is the streams Sergey is talking about : http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx
>>
>>I think it must be possible with the power shell
>
>Hi,
>
>Thanks for the links - better than the ones I found.
>Haven't read them all yet but the first link seems to suggest a simple solution:
> If running [notepad “FileName:Zone.Identifier"] allows you to change and save the ZoneId setting then maybe I can just do the same thing by opening it in .NET ?
>
>I'll try it in the morning........
>Best,
>Viv
----

Viv,

The links are not easy to find - found a couple of them yesterday - let it rest and had a hell of a time finding them back today

It's more of a collection of links - no structure - but then

I'm not sure about the notepad

I think it may be possible - I gave up yesterday. My impression - may be wrong - is that once you have the powershell dll/assembly you can do it as long as you have the appropriate permissons to the file

It seems to me that you have to take the Zone.Identifier out of the alternate data stream. I also found a message from someone complaining that .net provides no access to the alternate data stream. [ think it was by design ....]

I left it there - but I may, just may be tempted to have a look at it tomorrow. I love a good brain-teaser

Success,
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform