PeejAvery
March 10th, 2009, 01:13 PM
I'm working with a login script which adds a specific domain group to the local administrators group. Login scripts are supposed to run as SYSTEM. However, the following is giving me a "General access denied error" message. Any ideas?
Set objLocalGroup = GetObject("WinNT://./Administrators")
Set objADGroup = GetObject("WinNT://domain/groupname")
objLocalGroup.Add(objADGroup.ADsPath)
Set objLocalGroup = Nothing
Set objADGroup = Nothing
Set objLocalGroup = GetObject("WinNT://./Administrators")
Set objADGroup = GetObject("WinNT://domain/groupname")
objLocalGroup.Add(objADGroup.ADsPath)
Set objLocalGroup = Nothing
Set objADGroup = Nothing