|
I hate to ask a vb script question in a powershell thread, but you are probably the same braintrust that would answer the question anyway. In the following script, I would like to modify two registry entries instead of the one. I can't figure out if I need a different variable or if I am simply entering the second registry key in the wrong location. Anybody have any ideas? on error resume next Const HKEY_LOCAL_MACHINE = &H80000002 strPC = InputBox("Type the computer name here.") Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strPC & "\root\default:StdRegProv") strKey = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0010" objReg.CreateKey HKEY_LOCAL_MACHINE,strKey strEntry = "lom" strValue = 1 objReg.SetStringValue HKEY_LOCAL_MACHINE, strKey, strEntry, strValue on error goto 0
|
# ¿ Nov 14, 2011 17:33 |
|
|
# ¿ Apr 30, 2024 13:43 |