
sfimpersonator doesn't work ??
This is my script
an additon to the test.vbs file
my message boxes show me switching between users
but when regedit runs it doesn't appear to be under the admin account
since it is still locked out from some registry keys
(as a double check; my imposter user - administrator in this case - does
have rights as needed to all keys if i use the mocrosoft runas utility)
here is the code -PLEASE HELP
Option Explicit
'See the platform SDK for a description of these
Const LOGON_INTERACTIVE = 2
Const LOGON_NETWORK = 3
Const LOGON_BATCH = 4
Const LOGON_SERVICE = 5
Dim oNet
Set oNet = CreateObject("Wscript.Network")
MsgBox oNet.UserDomain & "\" & oNet.UserName
Dim impo
Set impo = CreateObject("sfImpersonator.Impostor")
'The dot in the third parameter is the domain name - "." means local domain
impo.Impersonate "Administrator", "password", ".", LOGON_INTERACTIVE
MsgBox oNet.UserDomain & "\" & oNet.UserName
Dim SH
Set SH = WScript.CreateObject("WScript.Shell")
SH.Run "regedit.exe", 1, True
impo.RevertToSelf
MsgBox oNet.UserDomain & "\" & oNet.UserName