Modify GPO
- From: chris.harrod@xxxxxxxxx
- Date: 17 Jan 2007 09:57:25 -0800
I do not have access to the domain controller but I'm trying to modify
the GPO or assign a logoff script to all clients on my network.
I attempted to do this through the registry (assign a logoff script)
but was roadblocked when I found out I couldn't enter a QWORD value.
Apparently the function SetQWORDValue is built into WMI but it doesn't
work unless you're using Vista. So my ugly GPO registry hack won't
work. I know it's an ugly hack, but that's okay =]
const HKEY_CURRENT_USER = &H80000001
Set StdOut = WScript.StdOut
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
strComputer & "\root\default:StdRegProv")
strKeyPath =
"SOFTWARE\Policies\Microsoft\Windows\System\Scripts\Logoff\1\1"
objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
strValueName = "ExecTime"
strValue = "hex(b):00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"
objReg.SetQWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
A also can't modify the machines' GPO through WSH/WMI to my knowledge.
Does anyone have a direction to point me in?
.
- Follow-Ups:
- Re: Modify GPO
- From: asdf
- Re: Modify GPO
- Prev by Date: Re: convert key=value to sgml
- Next by Date: Re: Login Script
- Previous by thread: Re: Login Script
- Next by thread: Re: Modify GPO
- Index(es):
Relevant Pages
|