我用custom action wizard做了,可运行时怎么不执行,高手指教

解决方案 »

  1.   

    系统的Custom Action Wizard做的很不好,最好自己用代码来控件。
    我以前做过一些。你可以参考,有你想要的功能。
    如下所示。
    installshield的代码结构比较简单。
    其中有些代码你可以在你的安装代码中找到。
    Dlg_sdSetupType:
        szTitle = "";
        szMsg   = ""; 
        svSetupType = "Typical";
        
        nResult = SdSetupTypeEx (szTitle, szMsg, "", svSetupType, 0);
    //以下的为我加的Dlg_SdComponentTree: 
    if (nResult = BACK) goto Dlg_SdAskDestPath;
        if !(svSetupType = '定制安装') goto Dlg_ObjDialogs;
        szTitle    = "";
        szMsg      = "";
        szTargetdir = TARGETDIR;
        szComponents = "";
        nLevel = 2;
        if (svSetupType = '定制安装') then
        nResult = SdComponentTree(szTitle, szMsg, szTargetdir, szComponents, nLevel);
        if (nResult = BACK) goto Dlg_SdAskDestPath;  
        endif;//增加结束
    Dlg_ObjDialogs:
        nResult = ShowObjWizardPages(nResult);
        if (nResult = BACK) goto Dlg_SdComponentTree;
    另,调用外部可执行程序可以如此。
    LaunchApp(TARGETDIR+"\\Config", "")
    最好放在OnEnd()  里执行。
    典型的如
    function OnEnd()                                    
    begin 
        if !MAINTENANCE then
        if (LaunchApp(TARGETDIR+"\\Config", "")) < 0 then
          MessageBox("配置应用程序失败,请稍后运行Config.exe文件进行配置", 1);  
        endif;
       endif;
    end;
      

  2.   

    用Wise吧,很方便的。只要在脚本中指出可执行文件的路径就可以了。