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;

  • 相关阅读:
    20140710 sequence 前缀和
    20140709 testC 数学题
    20140708 testA 组合数学
    20140708 testB DP 组合数学
    Sad :(
    已经是一个废人了……
    Game Theory
    HDU Math Problems
    2-sat问题
    并查集
  • 原文地址:https://www.cnblogs.com/lzjsky/p/1766786.html
Copyright © 2011-2022 走看看