Hallo,
I tried to use the SFImpersonator.dll for VB-Script, but I received an
Error Message:
Line 17
In German:
Fehler: Der Client besitzt ein erforderliches Recht nicht
In English
Error: The Client han't the rights
Which rights the SFImpersonator.dll need to excute on a Windows 2000
Professional ?
Has anyone for Informatioon/Readme for the SFImpersonator.dll ?
Thanks
Fred
Source: http://www.*-*-*.com/
SFImpersonator... Execute Code under the security context of another user.
26 kilobytes
Another MUST GET. Every NT administrator known to man could have a use for
this thing. No longer do we have to shell out to SU or RUNAS. More than
that, it's extremely easy to use. With this object one can impersonate the
security context of another user. Using the component in your code is as
simple as the following.
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 "UserName", "Password", ".", LOGON_INTERACTIVE
MsgBox oNet.UserDomain & "\" & oNet.UserName
impo.RevertToSelf
MsgBox oNet.UserDomain & "\" & oNet.UserName