1.0.10 • Published 4 years ago

native-win-js-for-fun v1.0.10

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

WIN-IMPERSONATOR-JS

Codacy Badge

Impersonator for Windows

Impersonator Object Factory with 2 public functions, "impersonateUser" and "stopImpersonation"

Calling COM Functions

Reimplementing Code originally written by Simon Buchan https://github.com/simonbuchan/native-users-node (Thanks a lot!)

Usage

import {createObject, LogonProvider, LogonType} from "native-win-js-for-fun";

...
let impersonator = createObject(userName, password, domain);

//impersonating Windows Account, calling functions LogonUserW and also ImpersonateLoggedOnUser
impersonator.impersonateUser(LogonType.NETWORK, LogonProvider.WINNT50);

//stop Impersonation, calling functions RevertToSelf and then closing handle
//This function must be called, otherwise handle will not be closed!!!
impersonator.stopImpersonation();
1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago