![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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) |
| | 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) |
| | 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) |
| | 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) |
| | 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 | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Executables in Alternate Data Stream would't execute | General Discussion | |||
| Bitmaps from streams - duplicated data in memory? | .NET General | |||
| any way to enable "alternate data streams" in Vista ? | Vista file management | |||