winreg-ts
Version:
provides access to the windows registry through the REG tool
53 lines (52 loc) • 2.1 kB
TypeScript
export interface RegistryItem {
readonly host: string;
readonly hive: string;
readonly key: string;
readonly name: string;
readonly type: string;
readonly value: string;
readonly arch: string;
}
export interface Options {
readonly host?: string;
readonly hive?: string;
readonly key?: string;
readonly arch?: string;
readonly utf8?: boolean;
}
export declare class Registry {
constructor(options?: Options);
get host(): string;
get hive(): string;
get key(): string;
get path(): string;
get arch(): string;
get utf8(): boolean;
get parent(): Registry;
static readonly HKLM: string;
static readonly HKCU: string;
static readonly HKCR: string;
static readonly HKU: string;
static readonly HKCC: string;
static readonly HIVES: string[];
static readonly REG_SZ: string;
static readonly REG_MULTI_SZ: string;
static readonly REG_EXPAND_SZ: string;
static readonly REG_DWORD: string;
static readonly REG_QWORD: string;
static readonly REG_BINARY: string;
static readonly REG_NONE: string;
static readonly REG_TYPES: string[];
static readonly DEFAULT_VALUE: string;
values(cb: (err: Error | null, items?: RegistryItem[]) => void): this;
keys(cb: (err: Error | null, items?: Registry[]) => void): this;
get(name: string, cb: (err: Error | null, item?: RegistryItem) => void): this;
set(name: string, type: string, value: string, cb: (err: Error | null, _ignored_?: any) => void): this;
remove(name: string, cb: (err: Error | null, _ignored_?: any) => void): this;
clear(cb: (err: Error | null, _ignored_?: any) => void): this;
erase(cb: (err: Error | null, _ignored_?: any) => void): this;
destroy(cb: (err: Error | null, _ignored_?: any) => void): this;
create(cb: (err: Error | null, _ignored_?: any) => void): this;
keyExists(cb: (err: Error | null, _ignored_?: any) => void): this;
valueExists(name: string, cb: (err: Error | null, _ignored_?: any) => void): this;
}