当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript regedit.list函数代码示例

本文整理汇总了TypeScript中regedit.list函数的典型用法代码示例。如果您正苦于以下问题:TypeScript list函数的具体用法?TypeScript list怎么用?TypeScript list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了list函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: isDontShowUIRegKeySet

export function isDontShowUIRegKeySet(regPath: string): Q.Promise<boolean> {
    const defer = Q.defer<boolean>();
    const regValue = 'DontShowUI';
    regedit.list(regPath).on('data', (entry) => {
        if (entry && entry.data && entry.data.values &&
            entry.data.values[regValue] && (entry.data.values[regValue].value === 1)) {
            defer.resolve(true);
        }
        defer.resolve(false);
    });
    return defer.promise;
}
开发者ID:shubham90,项目名称:vsts-tasks,代码行数:12,代码来源:taskinputparser.ts

示例2: getMSDeployInstallPath

function getMSDeployInstallPath(registryKey: string): Q.Promise<string> {
    var defer = Q.defer<string>();
    regedit.list(registryKey)
    .on('data', (entry) => {
        defer.resolve(entry.data.values.InstallPath.value);
    })
    .on('error', (error) => {
        defer.reject(tl.loc("UnabletofindthelocationofMSDeployfromregistryonmachineError", error));
    });

    return defer.promise;
}
开发者ID:HSAR,项目名称:vso-agent-tasks,代码行数:12,代码来源:msdeployutility.ts

示例3: getMSDeployVersion

function getMSDeployVersion(registryKey: string): Q.Promise<String> {
    var defer = Q.defer<String>();
    regedit.list(registryKey)
    .on('data', (entry) => {
        var keys = entry.data.keys;
        keys.sort();
        if(parseFloat(keys[keys.length-1]) < 3) {
            defer.reject(tl.loc("UnsupportedinstalledversionfoundforMSDeployversionshouldbealteast3orabove", keys[keys.length-1]));
        }
        defer.resolve(keys[keys.length-1]);
    })
    .on('error', (error) => {
        defer.reject(tl.loc("UnabletofindthelocationofMSDeployfromregistryonmachineError", error));
    });
    
    return defer.promise;
}
开发者ID:HSAR,项目名称:vso-agent-tasks,代码行数:17,代码来源:msdeployutility.ts

示例4: locateVSVersion

function locateVSVersion(): Q.Promise<number> {
    var defer = Q.defer<number>();
    var vsVersion = parseFloat(vsTestVersion);
    if (!isNaN(vsVersion)) {
        defer.resolve(vsVersion);
        return defer.promise;
    }
    var regPath = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio";
    regedit.list(regPath).on('data', function (entry) {
        if (entry && entry.data && entry.data.keys) {
            var subkeys = entry.data.keys;
            var versions = getFloatsFromStringArray(subkeys);
            if (versions && versions.length > 0) {
                versions.sort((a, b) => a - b);
                defer.resolve(versions[versions.length - 1]);
                return defer.promise;
            }
        }
        defer.resolve(null);
    });
    return defer.promise;
}
开发者ID:ColinDabritz,项目名称:vsts-tasks,代码行数:22,代码来源:vstest.ts

示例5: getLatestVSTestConsolePathFromRegistry

function getLatestVSTestConsolePathFromRegistry(): Promise<string> {
    let deferred = Q.defer<string>();
    let regPath = 'HKLM\\SOFTWARE\\Microsoft\\VisualStudio';
    regedit.list(regPath).on('data', (entry) => {
        let subkeys = entry.data.keys;
        let versions = getFloatsFromStringArray(subkeys);
        if (versions && versions.length > 0) {
            versions.sort((a, b) => a - b);
            let selectedVersion = versions[versions.length - 1];
            tl.debug('Registry entry found. Selected version is ' + selectedVersion.toString());
            return Promise.resolve(getVSTestLocation(selectedVersion));
        } 

        tl.debug('No Registry entry found under VisualStudio node');
        return Promise.resolve(null);
    }).on('error', () => {
        tl.debug('Registry entry not found under VisualStudio node');
        return Promise.resolve(null);
    });
    
    return Promise.resolve(null);
}
开发者ID:DarqueWarrior,项目名称:vsts-tasks,代码行数:22,代码来源:versionfinder.ts


注:本文中的regedit.list函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。