-------------------------------
--擦除光盘刻录软件Nero使用痕迹
--
-------------------------------

tInitDef = {}

tInitDef[1] = {}
tInitDef[1]["gbT"]="擦除光盘刻录软件运行痕迹"
tInitDef[1]["big5T"]="揽埃絃ㄨ魁硁ン笲︽勃格"
tInitDef[1]["enT"]="DVD&CD Clone"
tInitDef[1]["Key"]=180000
tInitDef[1]["iNoMenu"]=0
tInitDef[1]["fInstalled"]="LuaInstalled0"
tInitDef[1]["fEraseOpt"]="LuaCleaner0"
tInitDef[1]["tEraseTable"]="tEraseTable0"
tInitDef[1]["iRoot"]=8
tInitDef[1]["iSecond"]=0
tInitDef[1]["iThird"]=0

tInitDef[2] = {}
tInitDef[2]["gbT"]="擦除光盘刻录软件Nero使用痕迹"
tInitDef[2]["big5T"]="揽埃絃ㄨ魁硁ンNeroㄏノ勃格"
tInitDef[2]["enT"]="Nero"
tInitDef[2]["Key"]=180100
tInitDef[2]["iNoMenu"]=1
tInitDef[2]["fInstalled"]="LuaInstalled"
tInitDef[2]["fEraseOpt"]="LuaCleaner"
tInitDef[2]["tEraseTable"]="tEraseTable"
tInitDef[2]["iRoot"]=8
tInitDef[2]["iSecond"]=1
tInitDef[2]["iThird"]=0

tInitDef[3] = {}
tInitDef[3]["gbT"]="擦除光盘刻录软件Alcohol 120%使用痕迹"
tInitDef[3]["big5T"]="揽埃絃ㄨ魁硁ンAlcohol 120%ㄏノ勃格"
tInitDef[3]["enT"]="Alcohol 120%"
tInitDef[3]["Key"]=180200
tInitDef[3]["iNoMenu"]=1
tInitDef[3]["fInstalled"]="LuaInstalled3"
tInitDef[3]["fEraseOpt"]="LuaCleaner3"
tInitDef[3]["tEraseTable"]="tEraseTable"
tInitDef[3]["iRoot"]=8
tInitDef[3]["iSecond"]=2
tInitDef[3]["iThird"]=0

tInitDef[4] = {}
tInitDef[4]["gbT"]="擦除光盘刻录软件Easy CD Creator使用痕迹"
tInitDef[4]["big5T"]="揽埃絃ㄨ魁硁ンEasy CD Creatorㄏノ勃格"
tInitDef[4]["enT"]="Easy CD Creator"
tInitDef[4]["Key"]=180300
tInitDef[4]["iNoMenu"]=1
tInitDef[4]["fInstalled"]="LuaInstalled4"
tInitDef[4]["fEraseOpt"]="LuaCleaner4"
tInitDef[4]["tEraseTable"]="tEraseTable"
tInitDef[4]["iRoot"]=8
tInitDef[4]["iSecond"]=3
tInitDef[4]["iThird"]=0

tInitDef[5] = {}
tInitDef[5]["gbT"]="擦除光盘编辑软件Ultraiso使用痕迹"
tInitDef[5]["big5T"]="揽埃絃絪胯硁ンUltraisoㄏノ勃格"
tInitDef[5]["enT"]="Ultraiso"
tInitDef[5]["Key"]=180400
tInitDef[5]["iNoMenu"]=1
tInitDef[5]["fInstalled"]="LuaInstalled5"
tInitDef[5]["fEraseOpt"]="LuaCleaner5"
tInitDef[5]["tEraseTable"]="tEraseTable"
tInitDef[5]["iRoot"]=8
tInitDef[5]["iSecond"]=4
tInitDef[5]["iThird"]=0

tInitDef[6] = {}
tInitDef[6]["gbT"]="擦除 DVD Shrink 痕迹"
tInitDef[6]["big5T"]="揽埃 DVD Shrink 勃格"
tInitDef[6]["enT"]="DVD Shrink"
tInitDef[6]["Key"]=180500
tInitDef[6]["iNoMenu"]=1
tInitDef[6]["fInstalled"]="LuaInstalled6"
tInitDef[6]["fEraseOpt"]="LuaCleaner6"
tInitDef[6]["tEraseTable"]="tEraseTable"
tInitDef[6]["iRoot"]=8
tInitDef[6]["iSecond"]=5
tInitDef[6]["iThird"]=0

tInitDef[7] = {}
tInitDef[7]["gbT"]="擦除 友立DVD 拍拍烧 痕迹"
tInitDef[7]["big5T"]="揽埃 ねミDVD ╃╃縉 勃格"
tInitDef[7]["enT"]="Ulead DVD"
tInitDef[7]["Key"]=180501
tInitDef[7]["iNoMenu"]=1
tInitDef[7]["fInstalled"]="LuaInstalled7"
tInitDef[7]["fEraseOpt"]="LuaCleaner7"
tInitDef[7]["tEraseTable"]="tEraseTable"
tInitDef[7]["iRoot"]=8
tInitDef[7]["iSecond"]=6
tInitDef[7]["iThird"]=0

tInitDef[8] = {}
tInitDef[8]["gbT"]="擦除 WinISO 痕迹"
tInitDef[8]["big5T"]="揽埃 WinISO 勃格"
tInitDef[8]["enT"]="WinISO"
tInitDef[8]["Key"]=180502
tInitDef[8]["iNoMenu"]=1
tInitDef[8]["fInstalled"]="LuaInstalled8"
tInitDef[8]["fEraseOpt"]="LuaCleaner8"
tInitDef[8]["tEraseTable"]="tEraseTable"
tInitDef[8]["iRoot"]=8
tInitDef[8]["iSecond"]=7
tInitDef[8]["iThird"]=0

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

  require "wyzl"

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

function LuaInstalled()

	local bInstalled = 0
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\Ahead\\Nero - Burning Rom\\General", "RegisteredTypesNeroPath")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName) == true) then
			bInstalled = 1
		end		
	end
	strName = os.RegQueryValueEx(HKEY_CURRENT_USER,"Software\\Ahead\\Nero - Burning Rom\\Database", "LocalDbPath")
	if(strName ~= nil) then
		if(WYZL.GetDirFileExists(strName .. ".DLL") == true) then
			bInstalled = 1
		end		
	end
	return bInstalled
end;

function LuaCleaner0()
	tEraseTable0 = {};
end;

function LuaCleaner()
	
	strTitle ="擦除光盘刻录软件Nero使用痕迹"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="揽埃絃ㄨ魁硁ンNeroㄏノ勃格"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Nero"
  end
	
	WYZL.PlugReset();
	
	sKey = "HKEY_CURRENT_USER\\Software\\Ahead";
	
	sKeyPara = "\\Nero - Burning Rom\\Recent File List,\\Cover Designer\\Recent File List,";
	sKeyPara = sKeyPara .. "\\Nero Wave Editor\\Recent File List,\\Nero SoundTrax\\Recent File List,"
	sKeyPara = sKeyPara .. "\\Nero WaveEditor\\Recent File List,"
	WYZL.AddRegItem("DelRegKeyList",sKey,sKeyPara); 
	
	-- Nero7 start 
	
	sKey = "HKEY_CURRENT_USER\\Software\\Ahead";
	sKeyPara = "\\Nero WaveEditor\\Directories,Last\\r\\n";
	sKeyPara = sKeyPara .. "\\Nero WaveEditor\\Recent File List,all\\r\\n";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara); 
	
	sKey = "HKEY_CURRENT_USER\\Software\\Nero";
	sKeyPara = "Nero*\\Nero WaveEditor\\Recent File List,all\\r\\n";   --不带\为相对路径，支持通配符
	sKeyPara = sKeyPara .. "Nero*\\Nero WaveEditor\\Directories,Last"; 
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara); 
	
	-- Nero7 end
	
	-- Nero8 start
	
	sKey = "HKEY_CURRENT_USER\\Software\\Ahead\\Nero - Burning Rom";
	
	sKeyPara = "\\Settings,all\\r\\n";
	--sKeyPara = sKeyPara .. "\\Settings,BrowserDir,ImageDir,WorkingDir,ImageDir,BootImageDir,NeroCompilation,TrackSaveDir\\r\\n";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara);
	
	sKey = "HKEY_CURRENT_USER\\Software\\Nero\\Nero8\\Nero - Burning Rom";
	
	sKeyPara = "\\General,OFDLastISODir\\r\\n";
	sKeyPara = sKeyPara .. "\\recent file list,all\\r\\n";
	sKeyPara = sKeyPara .. "\\Settings,all\\r\\n";
	--sKeyPara = sKeyPara .. "\\Settings,BrowserDir,NeroCompilation,ImageDir,workingdir,bootimagedir,nerocompilation,tracksavedir\\r\\n";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara);
	
	sKey = "HKEY_CURRENT_USER\\Software\\Nero\\Nero8\\cover designer";
	sKeyPara = "\\recent file list,";
	WYZL.AddRegItem("DelRegKeyList",sKey,sKeyPara);  
	
	WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Nero\\Nero8\\PeakFiles\\*.tmp","SubFolder",",");
	
	WYZL.AddActionItem("DelFile","%AppData%\\Nero\\Nero8\\Nero Burning ROM\\*.log","",",");--SINGLEFILE
	WYZL.AddActionItem("DelFile","%LocalAppData%\\Nero\\Nero8\\Nero Burning ROM\\*.log","",",");--SINGLEFILE
	
	-- Nero8 end

	strName = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Ahead\\Shared", "NeroAPI")
	if(strName ~= nil) then
		WYZL.AddActionItem("DelFile",strName .. "\\NeroHistory.log","",",");--SINGLEFILE
	end

	--strName = os.RegQueryValueEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Common AppData")
	--if(strName ~= nil) then
		--WYZL.AddActionItem("DelFile",strName .. "\\Ahead\\Nero Recode","",",");--SINGLEFILE
		WYZL.AddActionItem("DelFile","%ALLUSERSPROFILE%\\Application Data\\Ahead\\Nero Recode","",",");--SINGLEFILE
	--end

	WYZL.AddActionItem("DelFile","%AppData%\\Ahead\\Nero Recode\\*.*","ExcludeSubFilesEx",",");--FILESFOLDERS
	WYZL.AddActionItem("DelFile","%LocalAppData%\\Ahead\\Nero Recode\\*.*","ExcludeSubFilesEx",",");--FILESFOLDERS
	
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("結束");
	end
	
end;

function LuaInstalled3()

	local bInstalled = 0
	bRet = os.RegKeyExists(HKEY_CURRENT_USER,"Software\\Alcohol Soft\\Alcohol 120%")
	if( bRet == true) then
		bInstalled = 1
	end

	return bInstalled
end;

function LuaCleaner3()

	tEraseTable = {};
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\Alcohol Soft\\Alcohol 120%\\Images");
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\Alcohol Soft\\Alcohol 120%\\Images\\Location");
	os.RegDeleteKey(HKEY_CURRENT_USER,"Software\\Alcohol Soft\\Alcohol 120%\\MountedMRU");
	os.RegDeleteValue(HKEY_CURRENT_USER,"Software\\Alcohol Soft\\Alcohol 120%\\Basic","Image File Path");
	os.RegDeleteValue(HKEY_CURRENT_USER,"Software\\Alcohol Soft\\Alcohol 120%\\Options\\Burning Wizard","ImageFile");
	os.RegDeleteValue(HKEY_CURRENT_USER,"Software\\Alcohol Soft\\Alcohol 120%\\Options\\Image Making Wizard","ImageFilePath");

end;

function LuaInstalled4()

	local bInstalled = 0
	bRet = os.RegKeyExists(HKEY_CURRENT_USER,"Software\\Adaptec\\Easy CD Creator")
	if( bRet == true) then
		bInstalled = 1
	end
	return bInstalled
end;

function LuaCleaner4()

	tEraseTable = {};
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\Adaptec\\Easy CD Creator\\5.0\\Creatr50.exe\\Recent File List");
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\Adaptec\\Easy CD Creator 4\\4.0");
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\Adaptec\\Easy CD Creator\\4.0");

end;

function LuaInstalled5()

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

function LuaCleaner5()
	
	strTitle ="擦除光盘编辑软件Ultraiso使用痕迹"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="揽埃絃絪胯硁ンUltraisoㄏノ勃格"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Ultraiso"
  end

	WYZL.PlugReset();
	
	sKey = "HKEY_CURRENT_USER\\Software\\EasyBoot Systems\\UltraISO";
	
	sKeyPara = "\\5.0,a,b,c,d,e,f,g,h,i,Reopen,OpenFolder\\r\\n";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara);
	
	WYZL.AddActionItem("DelFile","%PROGRAMFILES%\\UltraISO\\checklog.txt","",",");--SINGLEFILE
	
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("結束");
	end

end;

function LuaInstalled6()

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

function LuaCleaner6()

	tEraseTable = {};
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\DVD Shrink\\DVD Shrink 3.2\\Recent Targets");
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\DVD Shrink\\DVD Shrink 3.2\\Recent File List");
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\DVD Shrink\\DVDSHRINK103\\TargetFiles");
	os.RegDeleteAllValue(HKEY_CURRENT_USER,"Software\\DVD Shrink\\DVDSHRINK103\\SourceFolders");

end;

function LuaInstalled7()

	local bInstalled = 0
	bRet = os.RegKeyExists(HKEY_CURRENT_USER,"Software\\Ulead Systems\\Ulead DVD PictureShow")
	if( bRet == true) then
		bInstalled = 1
	end

	return bInstalled
end;

function LuaCleaner7()
	
	strTitle ="擦除 友立DVD 拍拍烧 痕迹"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="揽埃 ねミDVD ╃╃縉 勃格"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="Ulead DVD"
  end
	
	WYZL.PlugReset();
	
	sKey = "HKEY_CURRENT_USER\\Software\\Ulead Systems\\Ulead DVD PictureShow";
	
	sKeyPara = "\\2.0\\AddPhotoPage\\BrowseMode,LastVisitedFolderName\\r\\n";
	sKeyPara = sKeyPara .. "\\2.0\\finish step,all\\r\\n";
	sKeyPara = sKeyPara .. "\\2.0\\AddPhotoPage\\Tree Control\\History,all\\r\\n";
	sKeyPara = sKeyPara .. "\\2.0\\AddPhotoPage\\Tree Control\\Album,all\\r\\n";
	sKeyPara = sKeyPara .. "\\2.0\\LastUsedFolder,all\\r\\n";
	sKeyPara = sKeyPara .. "\\2.0\\Recent Project,all\\r\\n";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara);
	
	sKey = "HKEY_CURRENT_USER\\History";
	sKeyPara = "\\,all\\r\\n";
	WYZL.AddRegItem("DelRegValueListEx",sKey,sKeyPara);
	
	sKey = "HKEY_CURRENT_USER\\Software\\Ulead Systems";
	sKeyPara = "\\VIO\\Recent Dir,";
	WYZL.AddRegItem("DelRegKeyList",sKey,sKeyPara);
	
	WYZL.AddActionItem("DelFile","%AppData%\\Ulead Systems\\Ulead DVD Picture Show\\2.0\\Ulead.dat\\BwsCache\\*.*","",",");--SINGLEFILE
	WYZL.AddActionItem("DelFile","%LocalAppData%\\Ulead Systems\\Ulead DVD Picture Show\\2.0\\Ulead.dat\\BwsCache\\*.*","",",");--SINGLEFILE
	
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("結束");
	end

end;

function LuaInstalled8()

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

	return bInstalled
end;

function LuaCleaner8()
	
	strTitle ="擦除 WinISO 痕迹"
	if(WYZL.GetLanguage() == 2) then
  	strTitle="揽埃 WinISO 勃格"
  elseif(WYZL.GetLanguage() == 3) then
  	strTitle="WinISO"
  end
	
	WYZL.PlugReset();
	
	sKey = "HKEY_LOCAL_MACHINE\\Software\\WinISO";
	sKeyPara = "\\Reopen,";
	WYZL.AddRegItem("DelRegKeyList",sKey,sKeyPara);
	
	nReturn = 0;
	if(WYZL.IsLoaded() == 1) then
		nReturn = WYZL.DoPlugErase(strTitle,-1,0);
		
		--VCL.ShowMessage("結束");
	end

end;

