Usuário com melhor resposta
VBS - Registrar Chave

Pergunta
-
Boa Noite
Preciso criar um Vbs para registrar esta chave.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos]
"CRLTimeoutPeriod"=dword:600
"UseCachedCRLOnlyAndIgnoreRevocationUnknownErrors"=dword:1Grato
Nielsen R de Almeida
Respostas
-
Segue o script.
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Lsa\Kerberos"
strValueName = "CRLTimeoutPeriod"
dwValue = 600
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strValueName = "UseCachedCRLOnlyAndIgnoreRevocationUnknownErrors"
dwValue = 82
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValueComo vc está rodando esse script?
Se for na conta de usuário comum nas configurações de usuário da GPO não vai rodar mesmo.
Qualquer dúvida poste e se for útil vote.
Abraço.
Gabriel Nascimento MCP / MCSA / CCNA http://gabrielnascimentoit.spaces.live.com -- Se for útil vote.- Marcado como Resposta Fábio JrModerator quarta-feira, 7 de novembro de 2012 15:08
Todas as Respostas
-
Salve essa chave que vc deseja importar como .reg e o script abaixo como .vbs
Set wshell = CreateObject("WScript.Shell")
wshell.Run "regedit /s \\server\share\suachave.reg",hidden
Abraço.
Gabriel Nascimento MCP / MCSA / CCNA http://gabrielnascimentoit.spaces.live.com -- Se for útil vote. -
-
Segue o script.
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Lsa\Kerberos"
strValueName = "CRLTimeoutPeriod"
dwValue = 600
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strValueName = "UseCachedCRLOnlyAndIgnoreRevocationUnknownErrors"
dwValue = 82
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValueComo vc está rodando esse script?
Se for na conta de usuário comum nas configurações de usuário da GPO não vai rodar mesmo.
Qualquer dúvida poste e se for útil vote.
Abraço.
Gabriel Nascimento MCP / MCSA / CCNA http://gabrielnascimentoit.spaces.live.com -- Se for útil vote.- Marcado como Resposta Fábio JrModerator quarta-feira, 7 de novembro de 2012 15:08