![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | Registry and data types Can I only create REG_SZ data types from PowerShell while using the registry provider? I can't seem to determine whether one can create a REG_MULTI_SZ data type, for example. Marco -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Registry and data types It depeneds on the -value value you supply: # creates REG_SZ New-ItemProperty -Name StringValue -Value 1 -Path HKCU:\Software # creates REG_MULTI_SZ New-ItemProperty -Name MultipleStringValue -Value ([string[]]("Power","Shell")) -Path HKCU:\Software # creates REG_BINARY New-ItemProperty -Name BinaryValue -Value ([byte[]](1,2,3,4)) -Path HKCU:\Software Check this: http://scriptolog.blogspot.com/2007/...s-library.html ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic Quote: > Can I only create REG_SZ data types from PowerShell while using the > registry provider? > > I can't seem to determine whether one can create a REG_MULTI_SZ data > type, for example. > > Marco > > PowerGadgets MVP > http://www.powergadgets.com/mvp > Blog: > http://marcoshaw.blogspot.com |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Registry and data types I knew I had this information somewhere: PS C:\> $reg.SetMultiStringValue($HKCU,"PowerShellTFM\Key1\Key2",` Quote: Quote: >> "Sample Multi",(get-content c:\file.txt)) TFM to include a lot more on the StdReg WMI provider. -- Jeffery Hicks Microsoft PowerShell MVP http://www.scriptinganswers.com http://www.powershellcommunity.org Now Available: WSH and VBScript Core: TFM Coming Soon: Windows PowerShell: TFM 2nd Ed. "Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message news:O921xLUTIHA.5400@xxxxxx Quote: > Can I only create REG_SZ data types from PowerShell while using the > registry provider? > > I can't seem to determine whether one can create a REG_MULTI_SZ data type, > for example. > > Marco > > -- > Microsoft MVP - Windows PowerShell > http://www.microsoft.com/mvp > > PowerGadgets MVP > http://www.powergadgets.com/mvp > > Blog: > http://marcoshaw.blogspot.com |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Registry and data types Quote: I had noticed that post, but didn't dig into it. Great post by the way for others. Marco |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Problems with data types | PowerShell | |||
| could not update registry data? | Vista General | |||
| could not update registry data? | Vista General | |||
| could not update registry data? | Vista General | |||