Use PowerShell to read and write the registry and powershell to read and write

Source: Internet
Author: User

Use PowerShell to read and write the registry and powershell to read and write

HKEY_CURRENT_CONFIG \ test \ SideBySide \ Winners \ amd64 _. netframework_31bf3856ad364e35_none_f5dd4e94975c8e4e
Value = "amd64.netframework31bf3856ad364e35nonef5dd4e94975c8e4e" functionResolve −winners ( Value)
{
$ Base = "HKCU: \ test \ SideBySide \ Winners \"

$t = dir ( $base + $value )$t.GetType()   

<#
IsPublic IsSerial Name BaseType
-----------
True False RegistryKey System. financialbyrefobject

>
$t.Name

<#
HKEY_CURRENT_USER \ test \ SideBySide \ Winners \ amd64 _. netframework_31bf3856ad364e35_none_f5dd4e94975c8e4e \ 6.3

>
$t.Property

<#
6.3.9600.16384
(Default)

>
$t.GetValue("6.3.9600.16384")$t.GetValue("")$t2 = Get-Item  ( $base + $value )$t2.GetType()<#

IsPublic IsSerial Name BaseType
-----------
True False RegistryKey System. financialbyrefobject
#>

$t2.Name$t2.Property$t2.GetValue("")$t2.SetValue("","6")$t.GetValue("6.3.9600.16384")$t.SetValue("6.3.9600.16384", 2, "binary" )$key = ( $base + $value )Get-RegistryValue $key "(default)"Set-ItemProperty $key "(default)" "6.4"$t2.Name$t.Name$t.PSChildNameSet-ItemProperty $key "(default)"  $t.PSChildName

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.