-------------------------------
--Ӱʹ(Net Transport)ʹúۼ
--
-------------------------------

tInitDef = {}

tInitDef[1] = {}
tInitDef[1]["gbT"]="кۼ"
tInitDef[1]["big5T"]="UnB沪"
tInitDef[1]["enT"]="Downlowder"
tInitDef[1]["Key"]=170000
tInitDef[1]["iNoMenu"]=0
tInitDef[1]["fInstalled"]="LuaInstalled0"
tInitDef[1]["fEraseOpt"]="LuaCleaner0"
tInitDef[1]["tEraseTable"]="tEraseTable0"
tInitDef[1]["iRoot"]=7
tInitDef[1]["iSecond"]=0
tInitDef[1]["iThird"]=0

tInitDef[2] = {}
tInitDef[2]["gbT"]="Ӱʹ(Net Transport)ʹúۼ"
tInitDef[2]["big5T"]="vǰea(Net Transport)ϥβ"
tInitDef[2]["enT"]="Net Transport"
tInitDef[2]["Key"]=170100
tInitDef[2]["iNoMenu"]=1
tInitDef[2]["fInstalled"]="LuaInstalled"
tInitDef[2]["fEraseOpt"]="LuaCleaner"
tInitDef[2]["tEraseTable"]="tEraseTable"
tInitDef[2]["iRoot"]=7
tInitDef[2]["iSecond"]=1
tInitDef[2]["iThird"]=0

tInitDef[3] = {}
tInitDef[3]["gbT"]="ʿ쳵(FlashGet)ʹúۼ"
tInitDef[3]["big5T"]="ڧ֨(FlashGet)ϥβ"
tInitDef[3]["enT"]="FlashGet"
tInitDef[3]["Key"]=170200
tInitDef[3]["iNoMenu"]=1
tInitDef[3]["fInstalled"]="LuaInstalled3"
tInitDef[3]["fEraseOpt"]="LuaCleaner3"
tInitDef[3]["tEraseTable"]="tEraseTable"
tInitDef[3]["iRoot"]=7
tInitDef[3]["iSecond"]=2
tInitDef[3]["iThird"]=0

tInitDef[4] = {}
tInitDef[4]["gbT"]="(NetAnts)ʹúۼ"
tInitDef[4]["big5T"]="(NetAnts)ϥβ"
tInitDef[4]["enT"]="NetAnts"
tInitDef[4]["Key"]=170300
tInitDef[4]["iNoMenu"]=1
tInitDef[4]["fInstalled"]="LuaInstalled4"
tInitDef[4]["fEraseOpt"]="LuaCleaner4"
tInitDef[4]["tEraseTable"]="tEraseTable"
tInitDef[4]["iRoot"]=7
tInitDef[4]["iSecond"]=3
tInitDef[4]["iThird"]=0

tInitDef[5] = {}
tInitDef[5]["gbT"]="Internet Download Managerʹúۼ"
tInitDef[5]["big5T"]="Internet Download Managerϥβ"
tInitDef[5]["enT"]="Internet Download Manager"
tInitDef[5]["Key"]=170400
tInitDef[5]["iNoMenu"]=1
tInitDef[5]["fInstalled"]="LuaInstalled5"
tInitDef[5]["fEraseOpt"]="LuaCleaner5"
tInitDef[5]["tEraseTable"]="tEraseTable"
tInitDef[5]["iRoot"]=7
tInitDef[5]["iSecond"]=4
tInitDef[5]["iThird"]=0

tInitDef[6] = {}
tInitDef[6]["gbT"]="Free Download Managerʹúۼ"
tInitDef[6]["big5T"]="Free Download Managerϥβ"
tInitDef[6]["enT"]="Free Download Manager"
tInitDef[6]["Key"]=170500
tInitDef[6]["iNoMenu"]=1
tInitDef[6]["fInstalled"]="LuaInstalled6"
tInitDef[6]["fEraseOpt"]="LuaCleaner6"
tInitDef[6]["tEraseTable"]="tEraseTable"
tInitDef[6]["iRoot"]=7
tInitDef[6]["iSecond"]=5
tInitDef[6]["iThird"]=0

tInitDef[7] = {}
tInitDef[7]["gbT"]="Orbitʹúۼ"
tInitDef[7]["big5T"]="Orbitϥβ"
tInitDef[7]["enT"]="Orbit"
tInitDef[7]["Key"]=170600
tInitDef[7]["iNoMenu"]=1
tInitDef[7]["fInstalled"]="LuaInstalled7"
tInitDef[7]["fEraseOpt"]="LuaCleaner7"
tInitDef[7]["tEraseTable"]="tEraseTable"
tInitDef[7]["iRoot"]=7
tInitDef[7]["iSecond"]=6
tInitDef[7]["iThird"]=0

tInitDef[8] = {}
tInitDef[8]["gbT"]="ReGetʹúۼ"
tInitDef[8]["big5T"]="ReGetϥβ"
tInitDef[8]["enT"]="ReGet"
tInitDef[8]["Key"]=170700
tInitDef[8]["iNoMenu"]=1
tInitDef[8]["fInstalled"]="LuaInstalled8"
tInitDef[8]["fEraseOpt"]="LuaCleaner8"
tInitDef[8]["tEraseTable"]="tEraseTable"
tInitDef[8]["iRoot"]=7
tInitDef[8]["iSecond"]=7
tInitDef[8]["iThird"]=0

tInitDef[9] = {}
tInitDef[9]["gbT"]="GetRightʹúۼ"
tInitDef[9]["big5T"]="GetRightϥβ"
tInitDef[9]["enT"]="GetRight"
tInitDef[9]["Key"]=170800
tInitDef[9]["iNoMenu"]=1
tInitDef[9]["fInstalled"]="LuaInstalled9"
tInitDef[9]["fEraseOpt"]="LuaCleaner9"
tInitDef[9]["tEraseTable"]="tEraseTable"
tInitDef[9]["iRoot"]=7
tInitDef[9]["iSecond"]=8
tInitDef[9]["iThird"]=0

tInitDef[10] = {}
tInitDef[10]["gbT"]="Mass Downloadʹúۼ"
tInitDef[10]["big5T"]="Mass Downloadϥβ"
tInitDef[10]["enT"]="Mass Download"
tInitDef[10]["Key"]=170900
tInitDef[10]["iNoMenu"]=1
tInitDef[10]["fInstalled"]="LuaInstalled10"
tInitDef[10]["fEraseOpt"]="LuaCleaner10"
tInitDef[10]["tEraseTable"]="tEraseTable"
tInitDef[10]["iRoot"]=7
tInitDef[10]["iSecond"]=9
tInitDef[10]["iThird"]=0

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

  require "wyzl"
  require "vcl"

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

function GetDirPath(chkPath,tDirTable)
	local sDir3 = "";
	local sDrive3 = "";
	
	tDirTable[1]["drive"] = "";
	tDirTable[1]["path"] = "";
	
	bRet = WYZL.FileExists(chkPath,1);
	if(bRet == 1) then
	
		nLen = WYZL.StrLen(chkPath);
		nPos = WYZL.StrFind(chkPath,":",0);
		
		if(nPos > -1 ) then
			sDrive3 = WYZL.StrMid(chkPath,0,nPos + 1);
			
			sDir3 = WYZL.StrMid(chkPath,nPos + 1,nLen - nPos - 1);
			sDir3 = WYZL.TrimLeft(sDir3," \\");
			sDir3 = WYZL.TrimRight(sDir3," \\");
		end 
		
		tDirTable[1]["drive"] = sDrive3;-- ȡ
		tDirTable[1]["path"] = sDir3;-- ȡĿ¼
	end
	
	return "";
end

function CheckDir(sDrive,sDir,sysPath,tDirTable)
	local bReturn2 = 0;
	
	local sDir2 = "";
	local sDrive2 = "";
	
	GetDirPath(sysPath,tDirTable);
	
	sDrive2 = 	tDirTable[1]["drive"];
	sDir2 = tDirTable[1]["path"];
	
	--VCL.ShowMessage(sDir2);
	
	--nCompare1 = WYZL.StrCompare(sDrive,sDrive2,-1,0);
	nCompare2 = WYZL.StrCompare(sDir,sDir2,-1,0);
	
	if(nCompare2 == 0) then -- nCompare1 == 0 and ֻҪĿ¼ͬ͹ˣԱϵͳĿ¼
		bReturn2 = 1;
	end 
	
	--VCL.ShowMessage(tostring(nCompare1) .. "..." .. tostring(nCompare2));
	
	return bReturn2;
end

function IsProtectedDir(chkPath)
	local bReturn = -1;

	local tDirTable = {};
	tDirTable[1] = {};
	
	local sDir = "";
	local sDrive = "";
	
	local sDir2 = "";
	local sDrive2 = "";
	
	GetDirPath(chkPath,tDirTable);
	
	--VCL.ShowMessage(chkPath);
	
	sDrive = 	tDirTable[1]["drive"];-- ȡ
	sDir = tDirTable[1]["path"];-- ȡĿ¼
	
	if(sDrive ~= "") then
		bReturn = 0; -- Ŀ¼

		if(sDir == "") then
			bReturn = 1; -- Ŀ¼
			return bReturn;
		else
		  -----------------
			sWinDir = WYZL.GetCheckPath("%WinDir%");
			nCheckDir = CheckDir(sDrive,sDir,sWinDir,tDirTable);
			
			if(nCheckDir == 1) then
				bReturn = 2; -- windows Ŀ¼
				return bReturn;
			end 
			
			----------------
			sSystem = sWinDir;
			sSystem = sSystem .. "\\system32";
			nCheckDir = CheckDir(sDrive,sDir,sSystem,tDirTable);
			
			if(nCheckDir == 1) then
				bReturn = 3; -- system32 Ŀ¼
				return bReturn;
			end 
			
			--------------------------------------
			sSystem = sWinDir;
			sSystem = sSystem .. "\\system";
			nCheckDir = CheckDir(sDrive,sDir,sSystem,tDirTable);
			
			if(nCheckDir == 1) then
				bReturn = 3; -- system Ŀ¼
				return bReturn;
			end 
			
			----------
			sWinDir = WYZL.GetCheckPath("%ProgramFiles%");
			nCheckDir = CheckDir(sDrive,sDir,sWinDir,tDirTable);
			
			if(nCheckDir == 1) then
				bReturn = 4; -- Program Files Ŀ¼
				return bReturn;
			end 
			
			----------
			sWinDir = WYZL.GetCheckPath("%Programs%");
			nCheckDir = CheckDir(sDrive,sDir,sWinDir,tDirTable);
			
			if(nCheckDir == 1) then
				bReturn = 5; -- ʼ˵ Ŀ¼
				return bReturn;
			end 
			
			----------
			sWinDir = WYZL.GetCheckPath("%UserProfile%");
			nCheckDir = CheckDir(sDrive,sDir,sWinDir,tDirTable);
			
			if(nCheckDir == 1) then
				bReturn = 6; -- û Ŀ¼
				return bReturn;
			end 
			
			nPos = WYZL.StrReverseFind(sWinDir,"\\");
			if(nPos > -1) then
				-- Documents and Settings
				sWinDir = WYZL.StrLeft(sWinDir,nPos);
				
				----------
				sSystem = sWinDir;
				sSystem = sSystem .. "\\All Users";
				nCheckDir = CheckDir(sDrive,sDir,sSystem,tDirTable);
				
				if(nCheckDir == 1) then
					bReturn = 7; -- All Users Ŀ¼
					return bReturn;
				end 
				
				--------------
				sSystem = sWinDir;
				sSystem = sSystem .. "\\Default User";
				nCheckDir = CheckDir(sDrive,sDir,sSystem,tDirTable);
				
				if(nCheckDir == 1) then
					bReturn = 8; -- Default User Ŀ¼
					return bReturn;
				end 
			end
			
			----------
			sWinDir = WYZL.GetCheckPath("%AppData%");
			nCheckDir = CheckDir(sDrive,sDir,sWinDir,tDirTable);
			
			if(nCheckDir == 1) then
				bReturn = 9; -- Application Data Ŀ¼
				return bReturn;
			end 
			
			----------
			sWinDir = WYZL.GetCheckPath("%LocalAppData%");
			nCheckDir = CheckDir(sDrive,sDir,sWinDir,tDirTable);
			
			if(nCheckDir == 1) then
				bReturn = 10; -- Local Settings\Application Data Ŀ¼
				return bReturn;
			end 
			
			--VCL.ShowMessage(sSystem);
		end
	end 
	
	return bReturn;
end;


function LuaInstalled()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Net Transport_is1", "Inno Setup: App Path")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName .. "\\NetTransport.exe") == true) then
			bInstalled = 1
		end
	else
		strName = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Xi\\NetTransport 2", "Path")
		if(strName ~= nil) then
			if(WYZL.GetDirFileExists(strName .. "\\NetTransport.exe") == true) then
				bInstalled = 1
			end
		end
	end
	return bInstalled
end;

function LuaCleaner0()
	tEraseTable0 = {};
end;

function LuaCleaner()

	strTitle ="Ӱʹ(Net Transport)ʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="vǰea(Net Transport)ϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Net Transport"
  end

	WYZL.PlugReset();

	strName = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Net Transport_is1", "Inno Setup: App Path")
	strUser = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Net Transport_is1", "Inno Setup: User")
	
	if(strName == nil) then
		strName = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Xi\\NetTransport 2", "Path")
	end
	
	if(strName ~= nil) then
		strUser = WYZL.GetUserName()
		
		WYZL.AddActionItem("DelFile",strName .. "\\" .. strUser .. "'s temp\\*.*","FILESFOLDERS","");
		WYZL.AddActionItem("DelFile",strName .. "\\" .. strUser .. "' NetTransport.database.copy","","");
		WYZL.AddActionItem("DelFile",strName .. "\\" .. strUser .. "' NetTransport.database","","");
		
	end
		
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("Y");
	end

end;

function LuaInstalled3()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\JetCar\\JetCar\\General", "AppPath")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName) == true) then
			bInstalled = 1
		end		
	end
	return bInstalled
end;

function LuaCleaner3()

	strTitle ="ʿ쳵(FlashGet)ʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="ڧ֨(FlashGet)ϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="FlashGet"
  end

	WYZL.PlugReset();
	
  sKey = "HKEY_CURRENT_USER\\Software\\JetCar\\JetCar";
	sKeyPara = "\\DownDir,\\SelFolder,";
	WYZL.AddRegItem("DelRegKeyList",sKey,sKeyPara);  

  sKeyPara = "\\Recent File List,all\\r\\n"
  WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara); 

	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\JetCar\\JetCar\\General", "AppPath")
	if(strName ~= nil) then
		strName = WYZL.GetFileDir(strName)
     WYZL.AddActionItem("DelFile",strName .. "\\*.jcd","","");
     WYZL.AddActionItem("DelFile",strName .. "\\*.jcd.bak","","");
     WYZL.AddActionItem("DelFile",strName .. "\\*.bk1","","");
     WYZL.AddActionItem("DelFile",strName .. "\\Default.*","","");
   end
		
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("Y");
	end

end;

function LuaInstalled4()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\NetAnts", "Location")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName .. "\\NetAnts.exe") == true) then
			bInstalled = 1
		end		
	end
	return bInstalled
end;

function LuaCleaner4()

	strTitle ="(NetAnts)ʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="(NetAnts)ϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="NetAnts"
  end

	WYZL.PlugReset();

  sKey = "HKEY_CURRENT_USER\\Software\\NetAnts";
  sKeyPara = "\\MRU,all\\r\\n"
  WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara); 

	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\NetAnts", "Location")
	if(strName ~= nil) then
     WYZL.AddActionItem("DelFile",strName .. "\\netants_bk1.job","","");
     WYZL.AddActionItem("DelFile",strName .. "\\netantslog.htm","","");
     WYZL.AddActionItem("DelFile",strName .. "\\netants.job","","");
   end

	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);

		--VCL.ShowMessage("Y");
	end
end;

function LuaInstalled5()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\DownloadManager", "ExePath")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName) == true) then
			bInstalled = 1
		end
	else
		os.RegDeleteKey(HKEY_CURRENT_USER,"Software\\DownloadManager")		
	end
	return bInstalled
end;

function LuaCleaner5()

	strTitle ="Internet Download Managerʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="Internet Download Managerϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Internet Download Manager"
  end

	WYZL.PlugReset();

  sKey = "HKEY_CURRENT_USER\\Software\\DownloadManager";
	nMaxID = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\DownloadManager\\maxID", "maxID")
	for i = 0, nMaxID do
    sKeyPara = "\\" .. i
    WYZL.AddRegItem("DelRegKeyList",sKey,sKeyPara); 
	end

	sKeyPara = "\\,LastUrl\\r\\n";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara);
  --os.RegDeleteValue(HKEY_CURRENT_USER,"Software\\DownloadManager","LastUrl");
  --os.RegDeleteAllSubKey(HKEY_CURRENT_USER,"Software\\DownloadManager\\netApps");
  
	sKeyPara = "\\netApps,";
	WYZL.AddRegItem("DelRegKeyList",sKey,sKeyPara);  
	
	sKeyPara = "\\netApps,all";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara);  

	-- IDM\\ DwnlData Grabber GrabberData Scheduler temp *.dat *.txt
	WYZL.AddActionItem("DelFile","%AppData%\\IDM\\*.*","FilesFolders",""); 
	WYZL.AddActionItem("DelFile","%LocalAppData%\\IDM\\*.*","FilesFolders","");
		
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\DownloadManager", "TempPath")
	if(strName ~= nil) then
	  bProtected = IsProtectedDir(strName);
	  if(bProtected == 0) then
			WYZL.AddActionItem("DelFile",strName .. "\\*.*","FilesFolders","");
		else
			--VCL.ShowMessage("Ŀ¼ܱԶ");
		end
	end
	
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\DownloadManager", "AppDataIDMFolder")
	if(strName ~= nil) then
	  bProtected = IsProtectedDir(strName);
	  if(bProtected == 0) then
			WYZL.AddActionItem("DelFile",strName .. "\\*.*","FilesFolders","");
		else
			--VCL.ShowMessage("Ŀ¼ܱԶ");
		end
	end
	
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\DownloadManager", "ExePath")
	if(strName ~= nil) then
		nPos = WYZL.StrReverseFind(strName,"\\")
		strName = WYZL.StrLeft(strName,nPos);
		
		FileName = strName ;
		--VCL.ShowMessage(FileName);
		WYZL.AddActionItem("DelFile",FileName .. "\\Temp*.dat","","");
		WYZL.AddActionItem("DelFile",FileName .. "\\Temp*.txt","","");
		WYZL.AddActionItem("DelFile",FileName .. "\\GlobalErrors.log","","");
		
		FileName = strName ;
		FileName = FileName .. "\\TempGrabber";
		--VCL.ShowMessage(FileName);
		WYZL.AddActionItem("DelFile",FileName .. "\\*.*","FilesFolders","");
		
		FileName = strName ;
		FileName = FileName .. "\\TempScheduler";
		--VCL.ShowMessage(FileName);
		WYZL.AddActionItem("DelFile",FileName .. "\\*.*","FilesFolders","");    
		
		FileName = strName ;
		FileName = FileName .. "\\Temp";
		--VCL.ShowMessage(FileName);
		WYZL.AddActionItem("DelFile",FileName .. "\\*.*","FilesFolders","");    
	end  
			
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);

		--VCL.ShowMessage("Y");
	end	
	
end;

function LuaInstalled6()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "AppData")
	if(strName ~= nil) then
		if((WYZL.GetDirFileExists(strName ..  "\\Free Download Manager\\history.sav" ) == true) or (WYZL.GetDirFileExists(strName ..  "\\Free Download Manager\\flag.txt") == true)) then
			bInstalled = 1
		end		
	end
	return bInstalled
end;

function LuaCleaner6()

	strTitle ="Free Download Managerʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="Free Download Managerϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Free Download Manager"
	end
	
	WYZL.PlugReset();

	WYZL.AddActionItem("DelRegValueList","HKEY_CURRENT_USER\\Software\\FreeDownloadManager.ORG\\Free Download Manager\\Stat","","all");

	WYZL.AddActionItem("DelFile","%AppData%\\Free Download Manager\\*.*","FilesFolders","");
	WYZL.AddActionItem("DelFile","%LocalAppData%\\Free Download Manager\\*.*","FilesFolders","");

	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\FreeDownloadManager.ORG\\Free Download Manager\\Settings", "DataFolder")
	if(strName ~= nil) then
	FileName = strName ;
		WYZL.AddActionItem("DelFile",FileName .. "\\*.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\dlmgrsi.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\downloads.del.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\downloads.his.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\downloads.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\groups.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\history.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\mctasks.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\schedules.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\sites.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\spider.sav","","");
		--WYZL.AddActionItem("DelFile",FileName .. "\\uploads.1.sav","","");
	end

	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);

		--VCL.ShowMessage("Y");
	end

end;

function LuaInstalled7()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "AppData")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName .. "\\Orbit") == true) then -- \\conf.dat
			bInstalled = 1
		end		
	end
	return bInstalled
end;

function LuaCleaner7()

	strTitle ="Orbitʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="Orbitϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Orbit"
	end
	
	WYZL.PlugReset();

	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "AppData")
	if(strName ~= nil) then
	  WYZL.AddActionItem("DelFile",strName .. "\\Orbit\\DownloadList.dat","","");
	  WYZL.AddActionItem("DelFile",strName .. "\\Orbit\\fileinfo.dat","","");
	  WYZL.AddActionItem("DelFile",strName .. "\\Orbit\\filesave.dat","","");
	  WYZL.AddActionItem("DelFile",strName .. "\\Orbit\\flink\\*.*","FilesFolders","");
	end
	nerr,strName = WYZL.GetTempPath()
	if(nerr>0 and strName ~= nil) then
	  WYZL.AddActionItem("DelFile",strName .. "\\conf.dat","","");
	end

	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);

		--VCL.ShowMessage("Y");
	end

end;

function LuaInstalled8()

	local bInstalled = 0
	bRet = os.RegKeyExists(HKEY_CURRENT_USER,"Software\\ReGet Software\\ReGetPro")
	if( bRet == true) then
			bInstalled = 1
	end
	bRet = os.RegKeyExists(HKEY_CURRENT_USER,"Software\\ReGet Software\\ReGetDx")
	if( bRet == true) then
			bInstalled = 1
	end
	return bInstalled
end;

function LuaCleaner8()

	strTitle ="ReGetʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="ReGetϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="ReGet"
	end
	
	WYZL.PlugReset();

 	sKeyPara = "\\History\\HTTP\\Referer,all\\r\\n";
 	sKeyPara = sKeyPara .. "\\History\\Download\\Url,all\\r\\n";
 	sKeyPara = sKeyPara .. "\\History\\Download\\SaveTo,all\\r\\n";
	sKeyPara = sKeyPara .. "\\History\\Properties\\SiteUrl,all\\r\\n";
	sKeyPara = sKeyPara .. "\\History\\Properties\\Url,all\\r\\n"
	sKeyPara = sKeyPara .. "\\Search\\HistFind,all\\r\\n"
	sKeyPara = sKeyPara .. "\\History\\Site\\Url,all\\r\\n"
	sKeyPara = sKeyPara .. "\\FtpExplorer\\Hist,all\\r\\n"
	sKeyPara = sKeyPara .. "\\History\\Properties\\SaveTo,all\\r\\n"
	
	sKey = "HKEY_CURRENT_USER\\Software\\ReGet Software\\ReGetDx";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara); 
	
	sKey = "HKEY_CURRENT_USER\\Software\\ReGet Software\\ReGetPro";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara); 
  
	strName = os.getenv("USERPROFILE")
	if(strName ~= nil) then
	  WYZL.AddActionItem("DelFile",strName .. "\\Application Data\\ReGet Software\\*.*","FilesFolders","");
	end
	
	strName = os.getenv("ProgramFiles")
	if(strName ~= nil) then
	  WYZL.AddActionItem("DelFile",strName .. "\\ReGet Deluxe\\history\\*.*","FilesFolders","");
	end
	
	strName1 = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\ReGet Software\\ReGetDx", "QueueFile")
	if(strName1 ~= nil) then
	   strName = WYZL.GetFileDir(strName1)
	else
		strName1 = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\ReGet Software\\ReGetPro", "QueueFile")
		if(strName1 ~= nil) then
		   strName = WYZL.GetFileDir(strName1)
		else
			strName = strName .. "\\ReGet Deluxe"
		end
	end
	if(strName ~= nil) then
	  WYZL.AddActionItem("DelFile",strName .. "\\history\\*.*","FilesFolders","");
	  WYZL.AddActionItem("DelFile",strName .. "\\default.wjr","","");
	  WYZL.AddActionItem("DelFile",strName .. "\\default.bak","","");
	  WYZL.AddActionItem("DelFile",strName .. "\\Queue.wjr","","");
	  WYZL.AddActionItem("DelFile",strName .. "\\Queue.bak","","");
	end
  
	--ReGet Deluxe 4X
 	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\ReGet Software\\ReGetDx", "Dir")
	if(strName ~= nil) then
	  WYZL.AddActionItem("DelFile",strName .. "\\history\\*.*","FilesFolders","");
	end
 
  --ReGet Deluxe 5X
 	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\ReGet Software\\ReGetDx", "HistoryPath")
	if(strName ~= nil) then
	  bProtected = IsProtectedDir(strName);
	  if(bProtected == 0) then
		  WYZL.AddActionItem("DelFile",strName .. "\\*.*","FilesFolders","");
		else
			--VCL.ShowMessage("Ŀ¼ܱԶ");
	  end
	end

	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);

		--VCL.ShowMessage("Y");
	end

end;

function LuaInstalled9()

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

function LuaCleaner9()

	strTitle ="GetRightʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="GetRightϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="GetRight"
	end
	
	WYZL.PlugReset();

	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\Headlight\\GetRight\\MRU");
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\Headlight\\GetRight\\Recent File List");

	strName = os.getenv("ProgramFiles")
	if(strName ~= nil) then
		WYZL.AddActionItem("DelFile",strName .. "\\GetRight\\GetRight.hst","","");
	end

	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);

		--VCL.ShowMessage("Y");
	end
	
end;

function LuaInstalled10()

	local bInstalled = 0
	strName = os.getenv("ProgramFiles")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName .. "\\Mass Downloader\\INDEX") == true) then
			bInstalled = 1
		end		
	end
	return bInstalled
end;

function LuaCleaner10()

	strTitle ="Mass Downloadʹúۼ"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="Mass Downloadϥβ"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Mass Download"
	end
	
	WYZL.PlugReset();

	strName = os.getenv("ProgramFiles")
	if(strName ~= nil) then
		WYZL.AddActionItem("DelFile",strName .. "\\Mass Downloader\\INDEX\\*.*","FilesFolders","");
    --WYZL.AddActionItem("DelFile",strName .. "\\Mass Downloader\\INDEX\\history.bak","","");
    --WYZL.AddActionItem("DelFile",strName .. "\\Mass Downloader\\INDEX\\history.dat","","");
    --WYZL.AddActionItem("DelFile",strName .. "\\Mass Downloader\\INDEX\\massdown.dat","","");
	end
                           
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);

		--VCL.ShowMessage("Y");
	end

end;
