0
을 중단하지 장소. 사용자 지정 작업의하면 Installshield VBscribt ExitCode를 내가 데이터베이스가 비어하고있을 때, 제거가 걸릴 수 있습니다 경우 확인이의 installshiled 2016</p> <p>나는 VB 스크립트 (사용자 지정 작업에서 실행)가를 사용하여 설치 프로그램을 만들이 제거
설정은 다음과 같습니다
- 반환 처리 : 즉시 실행
- 실행 예약 : 동기는
- 에서 스크립트 실행 (종료 코드 확인) 항상 설치
- 을 실행 Exec을 시퀀스 : InstallValidate 이후
- 설치 실행 조건 : REMOVE = "ALL"
스크립트와 사용자 지정 작업을 실행하고 메시지 상자가 표시되지만 설치가 ExitCode를 = 3
비주얼 베이직 스크립트 무시 :
Function CheckService()
On Error Resume Next
Set objConnection = CreateObject("ADODB.Connection")
DB_CONNECT_STRING = "Provider=SQLOLEDB.1;Data Source=localhost;Trusted_Connection=Yes;"
objConnection.Open DB_CONNECT_STRING
set rs = objConnection.Execute("SELECT COUNT(*) as cnt FROM master.dbo.sysdatabases WHERE name = 'MonitoringConfiguration'")
if not rs.EOF then
recordsCount = cint(rs("cnt"))
end if
objConnection.Close
if recordsCount = 0 then
CheckService = 1
Exit Function
end if
DB_CONNECT_STRING = "Provider=SQLOLEDB.1;Data Source=localhost;Initial Catalog=MonitoringConfiguration;Trusted_Connection=Yes;"
objConnection.Open DB_CONNECT_STRING
set rs = objConnection.Execute("SELECT COUNT(*) as cnt from ServerSettings")
if not rs.EOF then
recordsCount = cint(rs("cnt"))
end if
objConnection.Close
if recordsCount <> 0 then
x=MsgBox("There are still monitoring services deployed. Please remove them first before remvoing System Monitoring",0,"Unable to Uninstall application")
CheckService = 3
Exit Function
else
CheckService = 1
Exit Function
end if
End Function
사전에 감사합니다.
[오류 코드 무시] (http://helpnet.flexerasoftware.com/isxhelp22/helplibrary/CA_Settings-VBS.htm#ref-views_2820697808_1095910) 항목을 언급하지 않았습니다. 그래서 그것은 틀린 것입니다. –
이 옵션은 일반적으로 "반송 처리"에 있습니다. 이제는 "동기식 (종료 코드 확인)"으로 설정되고, 다른 옵션은 "동기식 (종료 코드 무시)"입니다. –