Valek271183 |
29-12-2013 19:53 2280365 |
Как добавить данные к существующей ветке реестра
Есть ветка HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation в ней "Manufacturer"="MSI" как можно дописать с помощью .BAT или .reg к слову "MSI" ещё что-нибудь?
|
Valek271183, перепишите.
Или на WSH:
читать дальше »
Код:
Option Explicit
Const HKEY_LOCAL_MACHINE = &H80000002
Dim strValue
With WScript.CreateObject("WbemScripting.SWbemLocator").ConnectServer(".", "root\default")
With .Get("StdRegProv")
If .GetStringValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation", "Manufacturer", strValue) = 0 Then
strValue = strValue & " bla-bla-bla"
If Not .SetStringValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation", "Manufacturer", strValue) = 0 Then
WScript.Echo "Can't write registry parameter"
End If
Else
WScript.Echo "Can't read registry parameter"
End If
End With
End With
WScript.Quit 0
|
Время: 01:09.
© OSzone.net 2001-