Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

Using .vbs file to modify registry

0 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Mr NDP

ungelesen,
11.07.2002, 00:13:2611.07.02
an
Hello,

I want to use the following .vbs script to disable viewing of non rated
websites when my son is logged into the computer:

' Begin_Script
Option Explicit
Dim RegKey, WSHShell
Set WSHShell = CreateObject("WScript.Shell")
RegKey =
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\.Default\"
WSHShell.RegWrite regkey & "Allow_Unknowns", 0
'End_Script

However, instead of changing:

Allow_unknowns REG_DWORD 0x00000001 (1)

to this:

Allow_unknowns REG_DWORD 0x00000000 (0)

It changes it to:

Allow_unknowns REG_SZ 0

How can I modify my .vbs script to keep it from changing the key from
REG_DWORD to REG_SZ???

Please help...


Andy Cadley

ungelesen,
11.07.2002, 07:00:5811.07.02
an
If I remember correctly you can add a third parameter to RegWrite to specify
the type, so you'd need something like:

WSHShell.RegWrite regkey & "Allow_Unknowns", 0 , "REG_DWORD"

AndyC

"Mr NDP" <mr_...@yeahright.yahoo.com> wrote in message
news:3d2d045b$1...@news5.nntpserver.com...

0 neue Nachrichten