![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Alternate Data Streams on files Anyone have and idea if its possible and how to do this in Powershell? -- Brandon Shell --------------- Stop by my blog some time ![]() http://mybsinfo.blogspot.com/ ---------------------------------- |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Alternate Data Streams on files ..NET doesn't seem to have any managed support for accessing ADS so I would expect that Powershell lacks support as well. There are win32 api's that allow access... but you'd likely need a third party dll to use that from Powershell. You could creatively use some command line commands that support ADS to *read* the contents of a stream. I'm sure variations of this could be adapted for writing... but nothing in native powershell. PS C:\Downloads> cmd /c "dir /r" Volume in drive C has no label. Volume Serial Number is 0000-0000 Directory of C:\Downloads 01/08/2007 11:09 PM <DIR> . 01/08/2007 11:09 PM <DIR> .. 12/22/2006 11:08 PM 23,510,720 dotnetfx_v2.0.exe 26 dotnetfx_v2.0.exe:Zone.Identifier:$DATA PS C:\Downloads> $r = cmd /c "more < dotnetfx_v2.0.exe:Zone.Identifier:$DATA" PS C:\Downloads> $r [ZoneTransfer] ZoneId=3 -- gaurhoth http://gaurhothw.spaces.live.com/ "Brandon Shell" <tshell.mask@gmail.com> wrote in message news:ekkPVaCNHHA.1248@TK2MSFTNGP03.phx.gbl... > Anyone have and idea if its possible and how to do this in Powershell? > > -- > > Brandon Shell > --------------- > Stop by my blog some time > http://mybsinfo.blogspot.com/ > ---------------------------------- > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Alternate Data Streams on files Hi Brandon > Anyone have and idea if its possible and how to do this in Powershell? A few month ago dreeschkind posted this one: http://groups.google.de/group/micros...697a0aba7ab9ec hth Max |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Alternate Data Streams on files Thanks... That was what I was looking for... I knew it had been discussed, but my searches as well as google let me down ![]() "Maximilian Hänel" <ngSpam@smjh.de> wrote in message news:eXX$5tDNHHA.4376@TK2MSFTNGP03.phx.gbl... > Hi Brandon > >> Anyone have and idea if its possible and how to do this in Powershell? > > A few month ago dreeschkind posted this one: > > http://groups.google.de/group/micros...697a0aba7ab9ec > > hth > > Max |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: Alternate Data Streams on files I'm using the library i mentioned in the former thread, [void][System.Reflection.Assembly]::LoadFile("c:\powershell\ntfs.dll") and I have the following in my typedata, I use for unblocking files, I still have this on my "to blog" list <Type> <Name>System.IO.FileSystemInfo</Name> <Members> <ScriptMethod> <Name>Block</Name> <Script> $FS = new NTFS.FileStreams($this.fullname) $fs.add('Zone.Identifier') $stream = $fs.Item('Zone.Identifier').open() $sw = [System.IO.streamwriter]$stream $Sw.writeline('[ZoneTransfer]') $sw.writeline('ZoneID=4') $sw.close() $stream.close() </Script> </ScriptMethod> <ScriptMethod> <Name>UnBlock</Name> <Script> $FS = new NTFS.FileStreams($this.fullname) $fs['Zone.Identifier'].delete() </Script> </ScriptMethod> <ScriptMethod> <Name>GetFileStreams</Name> <Script> $FS = new NTFS.FileStreams($this.fullname) $fs </Script> </ScriptMethod> Greetings /\/\o\/\/ "Brandon Shell" <tshell@mask.gmail.com> wrote in message news:OeWlGHENHHA.1240@TK2MSFTNGP03.phx.gbl... > Thanks... That was what I was looking for... I knew it had been discussed, > but my searches as well as google let me down ![]() > > "Maximilian Hänel" <ngSpam@smjh.de> wrote in message > news:eXX$5tDNHHA.4376@TK2MSFTNGP03.phx.gbl... >> Hi Brandon >> >>> Anyone have and idea if its possible and how to do this in Powershell? >> >> A few month ago dreeschkind posted this one: >> >> http://groups.google.de/group/micros...697a0aba7ab9ec >> >> hth >> >> Max > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bitmaps from streams - duplicated data in memory? | Chris Ashley | .NET General | 1 | 06-20-2008 01:35 PM |
| any way to enable "alternate data streams" in Vista ? | Max | Vista file management | 3 | 03-18-2008 03:04 PM |
| Is it possible to use NTFS alternate data streams? | joe | Live Folder Share | 1 | 12-14-2007 03:49 PM |
| No files or data on IE 7 temporary Internet Files on standard acco | GT | Vista General | 3 | 02-27-2007 04:57 PM |