Installshield执行多条批处理的方法

上一篇: Installshield静默安装宝典 奕婷特许授权发布

使用FileInsertLine函数,测试连续运行100条命令成功

多条批处理处理函数写法


OpenFileMode(FILE_MODE_APPEND);
    CloseFile (nvFileHandle);    
    OpenFile (nvFileHandle, szMysqlLuJing,"my.ini");
    FileInsertLine (szMysqlLuJing + "my.ini", szMysqlText, 73,REPLACE) ;
    FileInsertLine (szMysqlLuJing + "my.ini", szMysqlText2, 76,REPLACE) ;
   
   
   
    OpenFileMode(FILE_MODE_APPEND);
    DeleteFile (szFile) ; 
    DeleteFile (szFileXin);
    if(    CreateFile(nvFileHandle,szPath,szName) = 0) then
        CloseFile (nvFileHandle);
        OpenFile (nvFileHandle, szPath,szName);
        FileInsertLine (szFile, szTingZhiShuJuKu, 0,BEFORE) ;
        FileInsertLine (szFile, szShanChuShuJuKu, 1,BEFORE) ;
        FileInsertLine (szFile, szJinPanFu, 2,BEFORE) ; 
        FileInsertLine (szFile, "cd " + szAnZhuangMuLu + "\\FastMovieItem\\mysq\\MySQL Server 5.1\\bin", 3,BEFORE) ;
        FileInsertLine (szFile, szZhuCeShuJuKu, 4,BEFORE) ;
        FileInsertLine (szFile, szKaiQiShuJuKu, 5,BEFORE) ;
        FileInsertLine (szFile, "pause", 6,BEFORE) ;
        CloseFile (nvFileHandle);
       
       
        if (RenameFile(szFile,szFileXin) = 0) then
         LaunchAppAndWait (szFileXin,"",WAIT);
         //DeleteFile (szFile) ; 
         //DeleteFile (szFileXin) ;
        endif;
        
    endif; 


下一篇:免脚本实现判断注册表项并安装第三方软件,Installshield2009适用

原文地址:https://www.cnblogs.com/Cindy_weiwei/p/1532459.html