WcaLog(LOGMSG_STANDARD,"INSTALLDIR is suspiciously short, better not do anything.");
return0;
}
if(check_only==0){
WcaLog(LOGMSG_STANDARD,"Determining number of matching services...");
intservicecount=remove_service(installdir,1);
if(servicecount<=0){
WcaLog(LOGMSG_STANDARD,"No services found, not removing anything.");
return0;
}elseif(servicecount==1){
TCHARbuf[256];
swprintf_s(buf,sizeof(buf),TEXT("There is a service called '%ls' set up to run from this installation. Do you wish me to stop and remove that service?"),last_service_name);
intrc=MessageBox(NULL,buf,TEXT("Removing MySQL Server"),MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
if(rc==IDCANCEL)return-1;
if(rc!=IDYES)return0;
}elseif(servicecount>0){
TCHARbuf[256];
swprintf_s(buf,sizeof(buf),TEXT("There appear to be %d services set up to run from this installation. Do you wish me to stop and remove those services?"),servicecount);
intrc=MessageBox(NULL,buf,TEXT("Removing MySQL Server"),MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);