當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。