Method | Description | |
---|---|---|
CloseHandle ( |
||
CreateUserProfileDir ( |
calls API CreateProfile an empty string on error a null string on already exists a string on success
|
|
DeleteProfile ( System.Security.Principal.SecurityIdentifier sid ) : bool | ||
DisconnectNetworkDrive ( string remoteUNC ) : System.Boolean |
disconnecting an UNC share
|
|
DomainMember ( string domain ) : bool |
query if the domain is part of a domain tree in which the local computer is a member of
|
|
GetCredentials ( string caption, string message ) : |
||
GetFreeShareSpace ( string share ) : long[] |
Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total amount of free space, and the total amount of free space available to the user that is associated with the calling thread. based on http://msdn.microsoft.com/en-us/library/windows/desktop/aa364937(v=vs.85).aspx
|
|
GetInteractiveUserList ( ) : List |
||
GetMachineDomainMembership ( ) : string |
get local machine domain membership as NETBIOS name
|
|
GetMachineDomainMembershipEX ( ) : string |
get local machine domain membership as DNS name
|
|
GetOrSetUserProfileDir ( string username, string domain, string password ) : string |
get or create user profile directory only if the ProfileList regkey is not of SID.bak (Abstractions.User.FixProfileList) an empty or null string means error
|
|
GetRegistryLocation ( structenums location ) : |
get RegistryKey from structenums.RegistryLocation
|
|
GetSessionContext ( ) : List |
returns a Dictionary of SessionID Keys and a List of usernames based on context in which a program is running. a program running as administrator will add administrator to the list
|
|
GetSessionContext ( int sessionID ) : List |
return username based on context in which a program is running. a program running as administrator will add administrator to the list session ID -1 retuns all sessions instead of a specific one
|
|
GetSessionContextParser ( int sessionID, Dictionary |
return username based on context in which a program is running. a program running as administrator will add administrator to the list session ID -1 retuns all sessions instead of a specific one
|
|
GetSessionId ( ) : int | ||
GetUserDomain ( int sessionId ) : string | ||
GetUserName ( int sessionId ) : string | ||
GetUserProfileDir ( IntPtr hToken ) : string |
returns userprofile based on GetUserProfileDirectory only if the ProfileList regkey is not of SID.bak (Abstractions.User.FixProfileList) empty string means error
|
|
GetUserProfilePath ( IntPtr hToken ) : string |
returns userprofile based on SHGetFolderPath only if the profile realy exists and the ProfileList regkey is not of SID.bak (Abstractions.User.FixProfileList) empty string means error
|
|
GetUserToken ( string username, string domain, string password ) : IntPtr |
Create a handle to the user token make sure to close the handle!!!
|
|
IsSessionLoggedOFF ( int session ) : bool | ||
LastError ( ) : string |
returns GetLastWin32Error as string
|
|
LastError ( int error ) : string |
returns GetLastWin32Error as string
|
|
LogoffSession ( int sessionId ) : bool | ||
MapNetworkDrive ( string remoteUNC, string username, string password ) : Boolean |
connect to a remote computer based on http://social.msdn.microsoft.com/Forums/et-EE/netfxbcl/thread/58159e0e-aa45-4d46-a128-596c3d23ff5c
|
|
MapNetworkDrive ( string remoteUNC, string username, string password, bool promptUser ) : Boolean |
connect to a remote computer based on http://social.msdn.microsoft.com/Forums/et-EE/netfxbcl/thread/58159e0e-aa45-4d46-a128-596c3d23ff5c
|
|
MapNetworkDrive ( string unc, string drive, string user, string password ) : int |
Map a network drive.
|
|
RegistryCloseKey ( UIntPtr hKey ) : Boolean | ||
RegistryCopyKey ( UIntPtr hKey_src, string SubKey, UIntPtr hKey_dst ) : Boolean | ||
RegistryCreateKey ( structenums RootKey, string SubKey ) : UIntPtr | ||
RegistryDeleteTree ( structenums RootKey, string SubKey ) : Boolean | ||
RegistryLoad ( structenums where, string name, string file ) : Boolean |
load a regfile at hklm or hku
|
|
RegistryOpenKey ( structenums RootKey, string SubKey ) : UIntPtr | ||
RegistryUnLoad ( structenums where, string name ) : Boolean |
unload regfile from regkey
|
|
SendMessageToUser ( int sessionID, string title, string message ) : Boolean |
send a messagebox to a session
|
|
SetPreshutdownTimeout ( SafeHandle handle, structenums &myServiceStatus ) : bool | ||
SetServiceStopped ( IntPtr handle, structenums &myServiceStatus ) : bool | ||
ShutdownPending ( IntPtr handle, structenums &myServiceStatus, TimeSpan wait ) : bool | ||
StartProcessInSession ( int sessionId, string cmdLine ) : |
||
StartProcessInSessionWait ( int sessionId, string cmdLine ) : bool | ||
StartProcessWithToken ( IntPtr token, string cmdLine ) : |
||
StartUserProcessInSession ( int sessionId, string cmdLine ) : bool | ||
StartUserProcessInSessionWait ( int sessionId, string cmdLine ) : bool | ||
UserADD ( string username, string password, string comment ) : Boolean |
add user to the local system based on http://social.msdn.microsoft.com/forums/en-us/csharpgeneral/thread/B70B79D9-971F-4D6F-8462-97FC126DE0AD
|
|
UserChangePassword ( string domainname, string username, string oldpassword, string newpassword ) : string | ||
UserDel ( string username ) : Boolean |
delete a local user based on http://social.msdn.microsoft.com/forums/en-us/csharpgeneral/thread/B70B79D9-971F-4D6F-8462-97FC126DE0AD
|
|
UserExists ( string username ) : Boolean |
return true if a local user exists
|
|
UserExists ( string username, string domain ) : Boolean |
return true if a local user exists
|
|
UserGet ( string username, string domain, structenums &userinfo4 ) : Boolean |
returns local user settings as a ref of an USER_INFO_4 struct based on http://social.msdn.microsoft.com/forums/en-us/csharpgeneral/thread/B70B79D9-971F-4D6F-8462-97FC126DE0AD
|
|
UserGet ( string username, structenums &userinfo4 ) : Boolean |
returns local user settings as a ref of an USER_INFO_4 struct based on http://social.msdn.microsoft.com/forums/en-us/csharpgeneral/thread/B70B79D9-971F-4D6F-8462-97FC126DE0AD
|
|
UserMod ( string username, structenums userInfo4 ) : Boolean |
modify local user settings based on a USER_INFO_4 struct based on http://social.msdn.microsoft.com/forums/en-us/csharpgeneral/thread/B70B79D9-971F-4D6F-8462-97FC126DE0AD
|
|
ValidateCredentials ( string username, string password ) : bool |
Attempts to validate the user's credentials for a local account using a pInvoke to LogonUser.
|
|
ValidateCredentials ( string username, string domain, string password ) : bool |
Attempts to validate the user's credentials using a pInvoke to LogonUser.
|
|
ValidateUser ( string username, string domain, string password ) : bool |
Attempts to validate the user's credentials using a pInvoke to LogonUser but ignores password change response.
|
|
VersionsInfo ( ) : structenums.OSVERSIONINFOW |
get the real windows version http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe
|
|
WTSQueryUserToken ( int sessionId ) : IntPtr | ||
WTSRegister ( IntPtr handle ) : bool | ||
WTSUnRegister ( IntPtr handle ) : bool |
Method | Description | |
---|---|---|
GetDomainInfo ( string domain ) : |
||
LogonUser ( string username, string domain, string password ) : int | ||
RegistryLoadSetPrivilege ( ) : Boolean |
public static CloseHandle ( |
||
handle | ||
return | bool |
public static CreateUserProfileDir ( |
||
hToken | ||
username | string | |
return | string |
public static DeleteProfile ( System.Security.Principal.SecurityIdentifier sid ) : bool | ||
sid | System.Security.Principal.SecurityIdentifier | |
return | bool |
public static DisconnectNetworkDrive ( string remoteUNC ) : System.Boolean | ||
remoteUNC | string | |
return | System.Boolean |
public static DomainMember ( string domain ) : bool | ||
domain | string | |
return | bool |
public static GetCredentials ( string caption, string message ) : |
||
caption | string | |
message | string | |
return |
public static GetFreeShareSpace ( string share ) : long[] | ||
share | string | |
return | long[] |
public static GetInteractiveUserList ( ) : List |
||
return | List |
public static GetMachineDomainMembership ( ) : string | ||
return | string |
public static GetMachineDomainMembershipEX ( ) : string | ||
return | string |
public static GetOrSetUserProfileDir ( string username, string domain, string password ) : string | ||
username | string | |
domain | string | |
password | string | |
return | string |
public static GetRegistryLocation ( structenums location ) : |
||
location | structenums | |
return |
public static GetSessionContext ( ) : List |
||
return | List |
public static GetSessionContext ( int sessionID ) : List |
||
sessionID | int | the seesion ID or -1 for all sessions |
return | List |
public static GetSessionContextParser ( int sessionID, Dictionary |
||
sessionID | int | the seesion ID or -1 for all sessions |
contextALL | Dictionary |
a GetSessionContext() Directory |
return | List |
public static GetUserDomain ( int sessionId ) : string | ||
sessionId | int | |
return | string |
public static GetUserName ( int sessionId ) : string | ||
sessionId | int | |
return | string |
public static GetUserProfileDir ( IntPtr hToken ) : string | ||
hToken | IntPtr | |
return | string |
public static GetUserProfilePath ( IntPtr hToken ) : string | ||
hToken | IntPtr | |
return | string |
public static GetUserToken ( string username, string domain, string password ) : IntPtr | ||
username | string | |
domain | string | |
password | string | |
return | IntPtr |
public static IsSessionLoggedOFF ( int session ) : bool | ||
session | int | |
return | bool |
public static LastError ( int error ) : string | ||
error | int | |
return | string |
public static LogoffSession ( int sessionId ) : bool | ||
sessionId | int | |
return | bool |
public static MapNetworkDrive ( string remoteUNC, string username, string password ) : Boolean | ||
remoteUNC | string | |
username | string | better use the domainname\username format |
password | string | |
return | Boolean |
public static MapNetworkDrive ( string remoteUNC, string username, string password, bool promptUser ) : Boolean | ||
remoteUNC | string | |
username | string | better use the domainname\username format |
password | string | |
promptUser | bool | true to for a promt, if needed |
return | Boolean |
public static MapNetworkDrive ( string unc, string drive, string user, string password ) : int | ||
unc | string | The full UNC path. |
drive | string | The drive letter (e.g. "Z:", "X:", etc.) |
user | string | The username, null if you want the current user. |
password | string | The password, null to use the default password. |
return | int |
public static RegistryCloseKey ( UIntPtr hKey ) : Boolean | ||
hKey | UIntPtr | |
return | Boolean |
public static RegistryCopyKey ( UIntPtr hKey_src, string SubKey, UIntPtr hKey_dst ) : Boolean | ||
hKey_src | UIntPtr | |
SubKey | string | |
hKey_dst | UIntPtr | |
return | Boolean |
public static RegistryCreateKey ( structenums RootKey, string SubKey ) : UIntPtr | ||
RootKey | structenums | |
SubKey | string | |
return | UIntPtr |
public static RegistryDeleteTree ( structenums RootKey, string SubKey ) : Boolean | ||
RootKey | structenums | |
SubKey | string | |
return | Boolean |
public static RegistryLoad ( structenums where, string name, string file ) : Boolean | ||
where | structenums | hklm or hku |
name | string | The name of the key to be created under hKey. This subkey is where the registration information from the file will be loaded |
file | string | |
return | Boolean |
public static RegistryOpenKey ( structenums RootKey, string SubKey ) : UIntPtr | ||
RootKey | structenums | |
SubKey | string | |
return | UIntPtr |
public static RegistryUnLoad ( structenums where, string name ) : Boolean | ||
where | structenums | hklm or hku |
name | string | |
return | Boolean |
public static SendMessageToUser ( int sessionID, string title, string message ) : Boolean | ||
sessionID | int | |
title | string | |
message | string | |
return | Boolean |
public static SetPreshutdownTimeout ( SafeHandle handle, structenums &myServiceStatus ) : bool | ||
handle | SafeHandle | |
myServiceStatus | structenums | |
return | bool |
public static SetServiceStopped ( IntPtr handle, structenums &myServiceStatus ) : bool | ||
handle | IntPtr | |
myServiceStatus | structenums | |
return | bool |
public static ShutdownPending ( IntPtr handle, structenums &myServiceStatus, TimeSpan wait ) : bool | ||
handle | IntPtr | |
myServiceStatus | structenums | |
wait | TimeSpan | |
return | bool |
public static StartProcessInSession ( int sessionId, string cmdLine ) : |
||
sessionId | int | |
cmdLine | string | |
return |
public static StartProcessInSessionWait ( int sessionId, string cmdLine ) : bool | ||
sessionId | int | |
cmdLine | string | |
return | bool |
public static StartProcessWithToken ( IntPtr token, string cmdLine ) : |
||
token | IntPtr | |
cmdLine | string | |
return |
public static StartUserProcessInSession ( int sessionId, string cmdLine ) : bool | ||
sessionId | int | |
cmdLine | string | |
return | bool |
public static StartUserProcessInSessionWait ( int sessionId, string cmdLine ) : bool | ||
sessionId | int | |
cmdLine | string | |
return | bool |
public static UserADD ( string username, string password, string comment ) : Boolean | ||
username | string | |
password | string | |
comment | string | |
return | Boolean |
public static UserChangePassword ( string domainname, string username, string oldpassword, string newpassword ) : string | ||
domainname | string | |
username | string | |
oldpassword | string | |
newpassword | string | |
return | string |
public static UserDel ( string username ) : Boolean | ||
username | string | |
return | Boolean |
public static UserExists ( string username ) : Boolean | ||
username | string | |
return | Boolean |
public static UserExists ( string username, string domain ) : Boolean | ||
username | string | |
domain | string | |
return | Boolean |
public static UserGet ( string username, string domain, structenums &userinfo4 ) : Boolean | ||
username | string | |
domain | string | |
userinfo4 | structenums | a ref of an USER_INFO_4 struct |
return | Boolean |
public static UserGet ( string username, structenums &userinfo4 ) : Boolean | ||
username | string | |
userinfo4 | structenums | a ref of an USER_INFO_4 struct |
return | Boolean |
public static UserMod ( string username, structenums userInfo4 ) : Boolean | ||
username | string | |
userInfo4 | structenums | |
return | Boolean |
public static ValidateCredentials ( string username, string password ) : bool | ||
username | string | The username |
password | string | The password |
return | bool |
public static ValidateCredentials ( string username, string domain, string password ) : bool | ||
username | string | The username |
domain | string | The domain |
password | string | The password |
return | bool |
public static ValidateUser ( string username, string domain, string password ) : bool | ||
username | string | The username |
domain | string | The domain |
password | string | The password |
return | bool |
public static VersionsInfo ( ) : structenums.OSVERSIONINFOW | ||
return | structenums.OSVERSIONINFOW |
public static WTSQueryUserToken ( int sessionId ) : IntPtr | ||
sessionId | int | |
return | IntPtr |
public static WTSRegister ( IntPtr handle ) : bool | ||
handle | IntPtr | |
return | bool |
public static WTSUnRegister ( IntPtr handle ) : bool | ||
handle | IntPtr | |
return | bool |