我明白,使用PowerShell可以更改registry值。
例如,在这里: http : //poshcode.org/3504
我们可以像这样设置属性:
Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoice' -name ProgId IE.FTP
然而,是否有可能使用PowerShell设置这些二进制值?
这是一个例子:
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections' $data = (Get-ItemProperty -Path $key -Name DefaultConnectionSettings).DefaultConnectionSettings $data[8] = 9 Set-ItemProperty -Path $key -Name DefaultConnectionSettings -Value $data