标签:powershell 注册表
HKEY_CURRENT_CONFIG\test\SideBySide\Winners\amd64_.netframework_31bf3856ad364e35_none_f5dd4e94975c8e4e
{
$base = “HKCU:\test\SideBySide\Winners\”
$t = dir ( $base + $value )
$t.GetType()
<#
IsPublic IsSerial Name BaseType
——– ——– —- ——–
True False RegistryKey System.MarshalByRefObject
$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.MarshalByRefObject
#>
$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.PSChildName
Set-ItemProperty $key "(default)" $t.PSChildName
}
标签:powershell 注册表
原文地址:http://blog.csdn.net/hadstj/article/details/46335939