zoukankan      html  css  js  c++  java
  • installshield 判断操作系统安装

    export prototype DefaultFeature_Installed(); 
    function DefaultFeature_Installed() 
    string szInfPath,szApp,szCmd,szKey,szKeyValue;
    begin


     // TARGETDIR = "<PROGRAMFILES>\EeePC\" in this project

     if (CMDLINE == "/NotLaunchApp") then
      //do nothing 
     else
      //Launch app  
      szApp = TARGETDIR + "CapsHook\\CapsHook.exe";
      LaunchApp(szApp,"");              
        endif;
             
        if(SYSINFO.nISOSL == ISOSL_WINXP) then
      szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\";
      szKeyValue = TARGETDIR + "CapsHook\\CapsHook.exe";
                                     
      RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); 
      RegDBCreateKeyEx(szKey, "");
      RegDBSetKeyValueEx(szKey,"CapsHook",REGDB_STRING,szKeyValue,-1);             
     else
      szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\";
      szKeyValue = "AsusSender.exe " + TARGETDIR + "CapsHook\\CapsHook.exe";
                                     
      RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); 
      RegDBCreateKeyEx(szKey, "");
      RegDBSetKeyValueEx(szKey,"CapsHook",REGDB_STRING,szKeyValue,-1);
     endif;          
    end;

    // -------------------------------------------------------------------------

    export prototype DefaultFeature_UnInstalled(); 
    function DefaultFeature_UnInstalled()
    string szApp, szKey, szKeyValue; 
    begin                                 

     //Delete Registry key   
     szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\CapsHook";
     RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
     RegDBDeleteKey(szKey);
    end;

  • 相关阅读:
    内存中字的存储
    代码段
    CPU运行的流程
    字的传送
    内存中字的存储
    c语言中求数组元素的最大值和最小值
    linux系统 centos8.3 中安装 Rsudio
    Error in .External2(C_X11, paste0("png::", filename), g$width, g$height, : 解决linux R绘图问题
    linux系统中使用R的Cairo绘制png格式图片
    c语言中利用二维数组统计考试成绩之和
  • 原文地址:https://www.cnblogs.com/lzjsky/p/1766786.html
Copyright © 2011-2022 走看看