Computer Object

The Computer object represents the current server system. You can use this object to query the server's local and mapped drives. You can also change a process's user credentials.

Collections

Drives

Methods

Impersonate, EndImpersonate

 

 

   Collections

Drives

A collection of Directory objects that represent mapped drives.

Access: Read

Notes: A Directory object referencing each drive letter assigned to a local device or network drive can be found in this collection in alphabetical order.

Example: The following example shows how to display each drive in the collection:

Set Computer = Server.CreateObject("ActiveFile.Computer")
For Each Drive In Computer.Drives
    Response.Write "Drive " & Drive.Path & "<BR>"
Next

See Also: Directory object

 

 

 

   Methods

Impersonate

Impersonate User, Password, Domain

Perform a network logon to NT as another user.

Parameter Description
User String containing the the name of the NT user to log on as.
Password String containing the password of the NT user to log on as.
Domain String containing the NT domain to log on to. Use "." to logon only to the local machine.

Returns: Nothing
Notes: This method is useful if you need to logon under a different user account in order to access resources that are not available under the IIS guest account.
For more information see Security Considerations.

!
This method can be disabled by setting the following registry value:

HKEY_LOCAL_MACHINE\SOFTWARE\Infomentum\ActiveFile\AllowImpersonation = False

Example: The following example shows how to login as another user:

Set Computer = Server.CreateObject("ActiveFile.Computer")
Computer.Impersonate "Jim","ADFFD","."

See Also: Computer.EndImpersonate method

EndImpersonate

EndImpersonate

End login as another user. The process must have permission to perform this action.  For more information see Security Considerations.

Returns: None

Notes: If you call Computer.Impersonate, you should immediately call Computer.EndImpersonate once you have finished accessing resources on behalf of that user.

Example: The following example shows how to end the login as another user:

' Code showing initialization of Computer object omitted
Computer.EndImpersonate

See Also: Computer.Impersonate method

File Upload File Download File Upload File Download File Upload File Download File Upload File Download File Upload File Download File Upload File Download ASP .NET Drag n Drop Java Mac OS X