[Code]var ErrorCode: Integer; IsRunning: Integer;// 安裝時判斷用戶端是否正在運行function InitializeSetup(): Boolean;begin Result :=true; //安裝程式繼續 IsRunning:=FindWindowByWindowName('東方寬頻網路電視'); while IsRunning<>0 do begin if Msgbox('安裝程式檢測到用戶端正在運行。' #13#13 '您必須先關閉它然後單擊“是”繼續安裝,或按“否”退出!', mbConfirmation, MB_YESNO) = idNO then begin Result :=false; //安裝程式退出 IsRunning :=0; end else begin Result :=true; //安裝程式繼續 IsRunning:=FindWindowByWindowName('東方寬頻網路電視'); end; end;end;// 卸載時判斷用戶端是否正在運行function InitializeUninstall(): Boolean;begin Result :=true; //安裝程式繼續 IsRunning:=FindWindowByWindowName('東方寬頻網路電視'); while IsRunning<>0 do begin if Msgbox('安裝程式檢測到用戶端正在運行。' #13#13 '您必須先關閉它然後單擊“是”繼續安裝,或按“否”退出!', mbConfirmation, MB_YESNO) = idNO then begin Result :=false; //安裝程式退出 IsRunning :=0; end else begin Result :=true; //安裝程式繼續 IsRunning:=FindWindowByWindowName('東方寬頻網路電視'); end; end;end;procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);begin case CurUninstallStep of usUninstall: begin // 開始卸載 end; usPostUninstall: begin // 卸載完成 // MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall just finished.', mbInformation, MB_OK); // ...insert code to perform post-uninstall tasks here... ShellExec('open', 'http://www.baidu.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode); end; end;end;