InstallShield学习(一):卸载按钮的创建

function CreateUninstallShortcut()  
 string strCmdLine; 
 LIST lstPath;
 begin  
 
 // For an InstallScript installation:
 strCmdLine = DISK1TARGET ^ "Setup.exe";   
 // For an InstallScript MSI installation:
 strCmdLine = UNINSTALL_STRING;   
 
 // The path has to be handled differently if you are running  
 // an InstallScript MSI installation 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;

 AddFolderIcon(FOLDER_PROGRAMS ^ szProjectName, "卸载",strCmdLine, "",TARGETDIR^"Uninstall.ico",0, "", REPLACE ); 
end;

posted on 2009-05-19 18:26  宁静羽  阅读(370)  评论(0)    收藏  举报

导航