在某一个函数(具体记不得了)写如下代码:if svDefGroup!="" then
 // Add main program icon
 AddFolderIcon(FOLDER_PROGRAMS^svDefGroup,@PRODUCT_NAME,
               TARGETDIR^"\\AutoDial.exe",TARGETDIR,
               TARGETDIR^"\\AutoDial.exe",0,"",REPLACE); // Add help file icon
 LogFilePath=TARGETDIR^"\\AutoDial.chm";
 LongPathToShortPath(LogFilePath);
 AddFolderIcon(FOLDER_PROGRAMS^svDefGroup,@PRODUCT_NAME+" Help",
               "hh.exe "+LogFilePath,WINDIR,
               "",0,"",REPLACE);
 // Add uninstall icon
 LogFilePath=TARGETDIR^"\\"^UNINST_LOGFILE_NAME;
 LongPathToShortPath(LogFilePath);
 AddFolderIcon(FOLDER_PROGRAMS^svDefGroup,("Uninstall "+@PRODUCT_NAME),
               ("IsUninst.exe -f"+LogFilePath),WINDIR,
                "",0,"",REPLACE);
endif;                   

解决方案 »

  1.   

    BCB_Fans: 请问目标文件夹下的Uninst.ist如何生成呢
      

  2.   

    试试这个:szWorkingDir    = WINDIR;
         //szIconPath      = TARGETDIR+"\\"+@PRODUCT_KEY;
         szIconPath      = PROGRAMFILES+"InstallShield Installation Information\\"+PRODUCT_GUID+"\\setup.exe";
         szItemName      = "卸载 "+@PRODUCT_NAME;
         //szProgram       = szIconPath;
         svTmp  = PROGRAMFILES+"InstallShield Installation Information\\"+PRODUCT_GUID+"\\setup.exe";
         LongPathToQuote(svTmp, TRUE);
         szParam         = svTmp;
         LongPathToShortPath(szParam);
         svTmp  = COMMONFILES+"InstallShield\\engine\\6\\Intel 32\\ctor.dll";
         LongPathToShortPath(svTmp); 
         szProgram       = "RunDll32"+" "+ svTmp+",LaunchSetup";
         szCommandLine = szProgram + " " + szParam; 
         //RunDll32 D:\PROGRA~1\COMMON~1\INSTAL~1\ENGINE\6\INTEL3~1\ctor.dll,LaunchSetup "D:\Program Files\InstallShield Installation Information\PRODUCT_GUID+"\\setup.exe" 
         if (AddFolderIcon(szProgramFolder, szItemName, szCommandLine, szWorkingDir,
                       szIconPath, nIcon, szShortCutKey, nFlag) < 0) then
            return -1;
         endif;
      

  3.   

    是Uninst.isu吧? 按装的时候InstallShield自动在按装目录下面生成.
      

  4.   

    我改成下面的代码,可以运行,但快捷方式的图标不对,请指点小弟,谢谢
    function OnMoving()
        string szAppPath, LogFilePath;
    begin
        // Set LOGO Compliance Application Path 
        // TO DO : if your application .exe is in a subfolder of TARGETDIR then add subfolder 
        szAppPath = TARGETDIR;
        szFolder = FOLDER_PROGRAMS^ @PRODUCT_NAME;
        RegDBSetItem(REGDB_APPPATH, szAppPath);
        RegDBSetItem(REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY);
        // Add uninstall icon
        AddFolderIcon(szFolder , ("卸载 "+@PRODUCT_NAME),
                   (UNINSTALL_STRING),WINDIR,
                    "",0,"",REPLACE);
    end;
      

  5.   

    InstallShield的标准答案:HOWTO: Creating an Uninstall Shortcut for a Standard Project via InstallScript
    Document ID: Q105816
    This article applies to the following: 
    Product(s): InstallShield Developer 7.02
    Last Revised On: 02/04/2002 
    Summary
    I am creating a Standard Project and I want to create an uninstall shortcut for my application. How do I do this with a Standard Project? 
    --------------------------------------------------------------------------------Discussion
    The following script function will create a shortcut called "Run the Uninstall" in a folder called "Uninstall Shortcut" under the Start | Programs menu that will run your install in maintenance mode: 
     prototype CreateUninstallShortcut(); function CreateUninstallShortcut()   string strCmdLine;  LIST lstPath; begin   strCmdLine = UNINSTALL_STRING;    // The path has to be handled differently if you are running on  // Windows 9X.  if ( SYSINFO.WIN9X.bWin9X ) then   lstPath = ListCreate( STRINGLIST );  StrGetTokens( lstPath, UNINSTALL_STRING, "/" );    ListGetFirstString( lstPath, strCmdLine );  LongPathToQuote( strCmdLine, TRUE );    strCmdLine = strCmdLine + " /M" + PRODUCT_GUID; endif;  // Create the actual shortcut... AddFolderIcon(FOLDER_PROGRAMS ^ "Uninstall Shortcut", "Run the Uninstall",strCmdLine, "","",0, "", NULL );  end; 
    --------------------------------------------------------------------------------Additional Information
    A Windows logo requirement states that the uninstaller must be accessible through Add/Remove Programs in the Control Panel and must operate properly from the Control Panel.
      

  6.   

    实在对不起,我也没辙了,因为下面代码在我这里运行得好好地(Uninst.isu也同样在按装目录下自动生成).////////////////////// string defines ////////////////////////////#define UNINST_LOGFILE_NAME      "Uninst.isu"//////////////////// installation declarations ///////////////////function SetupFolders()
    STRING LogFilePath;
     begin
      // TODO : Add all your folder (program group) along with shortcuts (program items)
      //
      //
      //    CreateProgramFolder, AddFolderIcon....
      //
      //    Note : for 16-bit setups you should add an uninstaller icon pointing to
      //           your log file.  Under 32-bit this is automatically done by Windows.
      LogFilePath=TARGETDIR^"\\"^UNINST_LOGFILE_NAME;
      LongPathToShortPath(LogFilePath);
      AddFolderIcon(FOLDER_PROGRAMS^svDefGroup,("卸载 "+@PRODUCT_NAME),("IsUninst.exe -f"+LogFilePath),WINDIR,"",0,"",REPLACE);  return 0;
     end;
      

  7.   

    我用的是 installshield6.3, 高手请往这边看
      

  8.   

    我已经在Resource中解决了,仍然非常感谢BCB_Fans,分给你了。
    能告诉我InstallShield Developer 7.02的下栽地址吗,不胜感谢,
    交个朋友好吗?
    [email protected]