-------------------------------
--²Á³ý·À»ðÇ½Èí¼þZoneAlarmÊ¹ÓÃºÛ¼£
--
-------------------------------

tInitDef = {}

tInitDef[1] = {}
tInitDef[1]["gbT"]="²Á³ýÉ±¶¾Èí¼þºÍ·À»ðÇ½Èí¼þÔËÐÐºÛ¼£"
tInitDef[1]["big5T"]="À¿°£±þ¬r³n¥ó©M¨¾¤õÀð³n¥ó¹B¦æ²ª¸ñ"
tInitDef[1]["enT"]="Antivus and FireWall"
tInitDef[1]["Key"]=160000
tInitDef[1]["iNoMenu"]=0
tInitDef[1]["fInstalled"]="LuaInstalled0"
tInitDef[1]["fEraseOpt"]="LuaCleaner0"
tInitDef[1]["tEraseTable"]="tEraseTable0"
tInitDef[1]["iRoot"]=6
tInitDef[1]["iSecond"]=0
tInitDef[1]["iThird"]=0

tInitDef[2] = {}
tInitDef[2]["gbT"]="²Á³ý·À»ðÇ½Èí¼þZoneAlarmÊ¹ÓÃºÛ¼£"
tInitDef[2]["big5T"]="À¿°£¨¾¤õÀð³n¥óZoneAlarm¨Ï¥Î²ª¸ñ"
tInitDef[2]["enT"]="ZoneAlarm"
tInitDef[2]["Key"]=160100
tInitDef[2]["iNoMenu"]=1
tInitDef[2]["fInstalled"]="LuaInstalled"
tInitDef[2]["fEraseOpt"]="LuaCleaner"
tInitDef[2]["tEraseTable"]="tEraseTable"
tInitDef[2]["iRoot"]=6
tInitDef[2]["iSecond"]=1
tInitDef[2]["iThird"]=0

tInitDef[3] = {}
tInitDef[3]["gbT"]="²Á³ýÉ±¶¾Èí¼þNOD 32Ê¹ÓÃºÛ¼£"
tInitDef[3]["big5T"]="À¿°£±þ¬r³n¥óNOD 32¨Ï¥Î²ª¸ñ"
tInitDef[3]["enT"]="NOD 32"
tInitDef[3]["Key"]=161000
tInitDef[3]["iNoMenu"]=1
tInitDef[3]["fInstalled"]="LuaInstalled3"
tInitDef[3]["fEraseOpt"]="LuaCleaner3"
tInitDef[3]["tEraseTable"]="tEraseTable"
tInitDef[3]["iRoot"]=6
tInitDef[3]["iSecond"]=2
tInitDef[3]["iThird"]=0

tInitDef[4] = {}
tInitDef[4]["gbT"]="²Á³ýAntiVirºÛ¼££¨²»²Á³ý¸ôÀëÎÄ¼þ£©"
tInitDef[4]["big5T"]="À¿°£AntiVir²ª¸ñ¡]¤£À¿°£¹jÂ÷¤å¥ó¡^"
tInitDef[4]["enT"]="AntiVir"
tInitDef[4]["Key"]=161100
tInitDef[4]["iNoMenu"]=1
tInitDef[4]["fInstalled"]="LuaInstalled4"
tInitDef[4]["fEraseOpt"]="LuaCleaner4"
tInitDef[4]["tEraseTable"]="tEraseTable"
tInitDef[4]["iRoot"]=6
tInitDef[4]["iSecond"]=3
tInitDef[4]["iThird"]=0

tInitDef[5] = {}
tInitDef[5]["gbT"]="²Á³ý¿¨°ÍË¹»ùÊ¹ÓÃºÛ¼£"
tInitDef[5]["big5T"]="À¿°£¥d¤Ú´µ°ò¨Ï¥Î²ª¸ñ"
tInitDef[5]["enT"]="KasperskyLab"
tInitDef[5]["Key"]=161101
tInitDef[5]["iNoMenu"]=1
tInitDef[5]["fInstalled"]="LuaInstalled5"
tInitDef[5]["fEraseOpt"]="LuaCleaner5"
tInitDef[5]["tEraseTable"]="tEraseTable"
tInitDef[5]["iRoot"]=6
tInitDef[5]["iSecond"]=4
tInitDef[5]["iThird"]=0

tInitDef[6] = {}
tInitDef[6]["gbT"]="²Á³ýÂó¿§·ÈÊ¹ÓÃºÛ¼£"
tInitDef[6]["big5T"]="À¿°£³Á©@°Ø¨Ï¥Î²ª¸ñ"
tInitDef[6]["enT"]="McAfee"
tInitDef[6]["Key"]=161102
tInitDef[6]["iNoMenu"]=1
tInitDef[6]["fInstalled"]="LuaInstalled6"
tInitDef[6]["fEraseOpt"]="LuaCleaner6"
tInitDef[6]["tEraseTable"]="tEraseTable"
tInitDef[6]["iRoot"]=6
tInitDef[6]["iSecond"]=5
tInitDef[6]["iThird"]=0

HKEY_CLASSES_ROOT = 0x80000000
HKEY_CURRENT_USER = 0x80000001
HKEY_LOCAL_MACHINE = 0x80000002
HKEY_USERS = 0x80000003

  require "wyzl"

--	strTitle =""
--	if(WYZL.GetLanguage() == 2) then
--  	strTitle=""
--  elseif(WYZL.GetLanguage() == 3) then
--  	strTitle=""
--  end

function LuaInstalled0()
	local bInstalled = 1
	return bInstalled
end;

function LuaInstalled()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Zone Labs\\ZoneAlarm", "InstallDirectory")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName) == true) then
			bInstalled = 1
		end		
	end
	return bInstalled
end;

function LuaCleaner0()
	tEraseTable0 = {};
end;

function LuaCleaner()

	strTitle ="ZoneAlarmÊ¹ÓÃºÛ¼£"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="ZoneAlarm¨Ï¥Î²ª¸ñ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="ZoneAlarm"
  end
	
  require "vcl"
  --VCL.ShowMessage(strTitle);
	
	WYZL.PlugReset();
	
	sKey = "";
	sKeyPara = ""

	WYZL.AddActionItem("DelFile","%WinDir%\\Internet Logs\\*.txt","ExcludeSubFiles",",IAMDB.RDB,");

	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("½YÊø");
	end
	
end;

function LuaInstalled3()

	local bInstalled = 0
	bRet = os.RegKeyExists(HKEY_LOCAL_MACHINE,"SOFTWARE\\Eset\\Nod\\CurrentVersion\\Modules\\Imon")
	if( bRet == true) then
			bInstalled = 1
	end
	return bInstalled
end;

function LuaCleaner3()

	tEraseTable = {};
	os.RegDeleteAllSubKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Eset\\Nod\\CurrentVersion\\Modules\\Imon\\Settings\\UserAgentList");
	os.RegDeleteAllSubKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Eset\\Nod\\CurrentVersion\\Modules\\Imon\\Settings\\Config000\\Settings\\active_ua_list");
end;

function LuaInstalled4()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\AntiVir PersonalEdition Classic", "ModifyPath")
	if(strName ~= nil) then
			bInstalled = 1
	end
	
	bRet = os.RegKeyExists(HKEY_LOCAL_MACHINE,"Software\\Avira\\AntiVir Desktop")
	if( bRet == true) then
			bInstalled = 1
	end
   
   bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop"),1);
   if(bRet == 1) then
         bInstalled = 1
   end
	
	return bInstalled
end;

function LuaCleaner4()
	
	strTitle ="²Á³ýAntiVirÊ¹ÓÃºÛ¼£"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="À¿°£AntiVir¨Ï¥Î²ª¸ñ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="AntiVir"
  end
  
  require "vcl"
  --VCL.ShowMessage(strTitle);
	
	WYZL.PlugReset();
	
	sKey = "";
	sKeyPara = ""

	--strName = os.getenv("ALLUSERSPROFILE")
	--VCL.ShowMessage(strName);
	
	bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Classic"),1);
	if(bRet == 1) then
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Classic\\FAILSAV\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Classic\\INFECTED\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Classic\\LOGFILES\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Classic\\SYSSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Classic\\TEMP\\*.*","FilesFolders",",");
	end 
		
	bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Premium"),1);
	if(bRet == 1) then
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Premium\\FAILSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Premium\\INFECTED\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Premium\\LOGFILES\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Premium\\SYSSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir PersonalEdition Premium\\TEMP\\*.*","FilesFolders",",");
	end 
		
	bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Classic"),1);
	if(bRet == 1) then
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Classic\\FAILSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Classic\\INFECTED\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Classic\\LOGFILES\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Classic\\SYSSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Classic\\TEMP\\*.*","FilesFolders",",");
	end 
		
	bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Premium"),1);
	if(bRet == 1) then
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Premium\\FAILSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Premium\\INFECTED\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Premium\\LOGFILES\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Premium\\SYSSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir PersonalEdition Premium\\TEMP\\*.*","FilesFolders",",");
	end 
		
	bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop"),1);
	if(bRet == 1) then
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop\\FAILSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop\\INFECTED\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop\\LOGFILES\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop\\SYSSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop\\TEMP\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop\\EVENTDB\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Avira\\AntiVir Desktop\\REPORTS\\*.*","FilesFolders",",");
	end 
		
	bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\AntiVir Desktop"),1);
	if(bRet == 1) then
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir Desktop\\FAILSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir Desktop\\INFECTED\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir Desktop\\LOGFILES\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir Desktop\\SYSSAVE\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir Desktop\\TEMP\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir Desktop\\EVENTDB\\*.*","FilesFolders",",");
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\AntiVir Desktop\\REPORTS\\*.*","FilesFolders",",");
	end 
	
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("½YÊø");
	end

end;

function LuaInstalled5()

	local bInstalled = 0
	bRet = os.RegKeyExists(HKEY_LOCAL_MACHINE,"Software\\KasperskyLab")
	if(bRet == true) then
			bInstalled = 1
	end
	return bInstalled
end;

function LuaCleaner5()
	
	strTitle ="²Á³ý¿¨°ÍË¹»ùÊ¹ÓÃºÛ¼£"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="À¿°£¥d¤Ú´µ°ò¨Ï¥Î²ª¸ñ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Kaspersky"
  end
  
  require "vcl"
  --VCL.ShowMessage(strTitle);
	
	WYZL.PlugReset();
	
	sKey = "";
	sKeyPara = ""
	
	sKey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\KasperskyLab\\protected";
	sKeyPara = ""

	sKeyPara = sKeyPara .. "AVP*\\reports\\eventlog,all\\r\\n";
	sKeyPara = sKeyPara .. "AVP*\\reports\\eventcritlog,all\\r\\n";

	WYZL.AddRegItem("DelRegValueListBEx",sKey,sKeyPara);
	
	sKeyPara = ""
	sKeyPara = sKeyPara .. "AVP*\\profiles\\Hips\\settings\\Application\\0*\\Childs,";
	sKeyPara = sKeyPara .. "AVP*\\profiles\\ProcMon\\settings\\aItems,";
	WYZL.AddRegItem("DelRegKeyListB",sKey,sKeyPara);
	
	WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Kaspersky Lab\\*.*","MacthSubPath",",AVP*|Report,*.*");
	WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Kaspersky Lab\\*.*","MacthSubPath",",AVP*|PdmHist,*.*");

	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("½YÊø");
	end

end;

function LuaInstalled6()

	local bInstalled = 0
	bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\McAfee"),1);
	if(bRet == 0) then
		bRet = WYZL.FileExists(WYZL.GetCheckPath("%ALLUSERSPROFILE%\\Application Data\\Network Associates"),1);
	end
		
	if(bRet == 1) then
			bInstalled = 1
	end
	
	return bInstalled
end;

function LuaCleaner6()

	strTitle ="²Á³ýÂó¿§·ÈÊ¹ÓÃºÛ¼£"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="À¿°£³Á©@°Ø¨Ï¥Î²ª¸ñ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="McAfee"
  end
	
  require "vcl"
  --VCL.ShowMessage(strTitle);
	
	WYZL.PlugReset();
	
	sKey = "";
	sKeyPara = ""

	WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\McAfee\\DesktopProtection\\*.txt","","");
	WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Network Associates\\VirusScan\\*.txt","","");
	
	WYZL.AddActionItem("DelFile","%PROGRAMFILES%\\McAfee\\McAfee VirusScan\\ScanLog.txt","SubFolder","");
	
	WYZL.AddActionItem("DelFile","%PROGRAMFILES%\\McAfee\\VirusScan NT\\ScanLog.txt","","");
	WYZL.AddActionItem("DelFile","%PROGRAMFILES%\\McAfee\\VirusScan NT\\VirusScan Activity Log","","");
	
	WYZL.AddActionItem("DelFile","%PROGRAMFILES%\\Network Associates\\VirusScan NT\\ScanLog.txt","","");
	WYZL.AddActionItem("DelFile","%PROGRAMFILES%\\Network Associates\\VirusScan NT\\VirusScan Activity Log","","");

	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("½YÊø");
	end

end;
