Trying to run a page that requires admin rights. Tried using the
LogonAdmin.dll but doen't seem to be working.
Here's my code:
'--------------------------------------------------------
Dim objLogon, Username, Password, Domain
Username = "administra tor"
Password = "thepwd"
Domain = "theserver"
Set objLogon = Server.CreateOb ject("LoginAdmi n.ImpersonateUs er")
objLogon.Logon Username, Password, Domain
Dim fso, f
Set fso = CreateObject("S cripting.FileSy stemObject")
Set f = fso.CreateFolde r("c:\Blocked\N ewOne")
objLogon.Logoff
Set objLogon = Nothing
'--------------------------------------------------------
Only the local admin has access to the Blocked folder.
The dll doesn't reurn any errors but i get get the permission denied error
from the line that tries to create the folder.
What am i missing?
any suggestions would be appreciated
-nathan-
LogonAdmin.dll but doen't seem to be working.
Here's my code:
'--------------------------------------------------------
Dim objLogon, Username, Password, Domain
Username = "administra tor"
Password = "thepwd"
Domain = "theserver"
Set objLogon = Server.CreateOb ject("LoginAdmi n.ImpersonateUs er")
objLogon.Logon Username, Password, Domain
Dim fso, f
Set fso = CreateObject("S cripting.FileSy stemObject")
Set f = fso.CreateFolde r("c:\Blocked\N ewOne")
objLogon.Logoff
Set objLogon = Nothing
'--------------------------------------------------------
Only the local admin has access to the Blocked folder.
The dll doesn't reurn any errors but i get get the permission denied error
from the line that tries to create the folder.
What am i missing?
any suggestions would be appreciated
-nathan-
Comment