1.0.10 • Published 6 years ago

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

Weekly downloads
13
License
MIT
Repository
github
Last release
6 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

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago