zoukankan      html  css  js  c++  java
  • 枚举注册表

    1.工程类型:IS2010 installscript

    2.目的:枚举注册表中donet版本,如果注册表中存在的版本与要检测的版本一致,就返回true,否则返回false.

    3.具体实现:


    function BOOL LISTDonetVer(DefineVer)
      STRING   InstallVer,SPVer;
      LIST   listID;
      STRING nzItem, szSubKey,svString; 
      NUMBER nResult,nReturn, nItem,nvType,nvSize;
      LIST   listSubKeys, listNames;

    begin
       listSubKeys = ListCreate(STRINGLIST);
          listNames = ListCreate(STRINGLIST);
          RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
          szSubKey = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP";
          nReturn = RegDBQueryKey ( szSubKey, REGDB_KEYS, listSubKeys );
         if (nReturn >=0) then
           nResult = ListGetFirstString (listSubKeys, svString);
          // Loop while list items continue to be retrieved.
              while (nResult != END_OF_LIST)
              // Get the next string in the list.
                 nResult = ListGetNextString (listSubKeys, svString);
                   if(svString=DefineVer)then
                     szSubKey=szSubKey+"\\"+svString;
                     RegDBGetKeyValueEx (szSubKey, "Install", nvType, InstallVer, nvSize);
                     RegDBGetKeyValueEx (szSubKey, "SP", nvType, SPVer, nvSize);
                    if( StrCompare(InstallVer,"1")=0)&&(StrCompare(SPVer,"1")>=0) then
                          return  TRUE;
                  else
                          return  FALSE;
       
                   endif;
               endif; 
            endwhile;
     
         endif;
    end;

  • 相关阅读:
    lambda关键字
    11.4 传递函数:
    装饰器
    maven如何将本地jar安装到本地仓库
    揭秘:日赚千元的冷门暴利项目,这个产品99%的人不知道
    参数组
    你不知道的事:AWR 基线和 AWR Compare Period Report 功能介绍
    python 关键字和位置参数
    IDL 数组相关函数
    IDL 数组相关函数
  • 原文地址:https://www.cnblogs.com/sabrinahuang/p/2184457.html
Copyright © 2011-2022 走看看