bonafide247
IS-IT--Management
VBScript padawan here.
* Active Directory Domain - 2003
* Windows XP SP3 computers
I want to push out a registry change via VBScript. This code runs fine on accounts with admin access, but will not run for standard users. My current logon script, which maps printer/drives/etc, runs fine on all accounts. I am just having trouble getting this registry entry created.
Is there any additional code, access, or anything else required for the code to work? Thank you for your help!
------------------------------------------------------------
-----------------------------------------------------
* Active Directory Domain - 2003
* Windows XP SP3 computers
I want to push out a registry change via VBScript. This code runs fine on accounts with admin access, but will not run for standard users. My current logon script, which maps printer/drives/etc, runs fine on all accounts. I am just having trouble getting this registry entry created.
Is there any additional code, access, or anything else required for the code to work? Thank you for your help!
------------------------------------------------------------
Code:
[b]const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\windows\currentversion\netcache"
strValueName = "FormatDatabase"
dwValue = 1
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue[/b]