argumento Path é necessário o caminho para uma chave ou valor que será criado se
não foi encontrado. StrToWr são os dados para entrar na chave ou valor especificado no
Path.
WrReg path, strToWrite
usando:
CÓDIGO
<%
' escrever no registo
dim a
' escrever um valor
WrReg "HKCU\testregwrite\testvalue", " teste de valor"
' escrever uma key
WrReg "HKCU\testregwrite\testkey\", "valor key"
%>
' escrever no registo
dim a
' escrever um valor
WrReg "HKCU\testregwrite\testvalue", " teste de valor"
' escrever uma key
WrReg "HKCU\testregwrite\testkey\", "valor key"
%>
code:
CÓDIGO
<%
Private Sub WrReg (byVal path, byVal strToWrite)
Dim objShl
Set objShl = CreateObject("wscript.shell")
On Error Resume Next
if IsNumeric( strToWrite ) Then
objShl.WrReg( path, CInt( strToWrite ), "REG_DWORD" )
else
objShl.WrReg( path, strToWrite )
end if
If Err Then Err.Clear
On Error GoTo 0
Set objShl = Nothing
End Sub
%>
Private Sub WrReg (byVal path, byVal strToWrite)
Dim objShl
Set objShl = CreateObject("wscript.shell")
On Error Resume Next
if IsNumeric( strToWrite ) Then
objShl.WrReg( path, CInt( strToWrite ), "REG_DWORD" )
else
objShl.WrReg( path, strToWrite )
end if
If Err Then Err.Clear
On Error GoTo 0
Set objShl = Nothing
End Sub
%>

Help














