function Component()
{
	if (installer.isInstaller()){
		var product_id;
		if(installer.value("prog_x86",false)=="true") 
			product_id = "Python 3.7 PySVN for Win32_is1";
		else
			product_id = "Python 3.7 PySVN for Win64_is1";
		var tsvn_version = installer.execute("reg", new Array("QUERY", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"+product_id, "/ve"))[0];
		if (tsvn_version){
			component.setValue("Default",false);
			component.setValue("Description","Программа уже установлена");
			component.setValue("ForcedInstallation",false);
			component.enabled = false;
		}
	}
}

Component.prototype.createOperations = function()
{
    // call default implementation to actually install the registeredfile
    component.createOperations();
	var inst_file;
    if(installer.value("prog_x86",false)=="true") {
    //x86
		inst_file = "py37-pysvn-svn1110-1.9.9-1994-Win32.exe";
	} else {
		inst_file = "py37-pysvn-svn1141-1.9.13-2056-Win64.exe";
	}

    var native_path=installer.toNativeSeparators(installer.value("TargetDir")+"/"+inst_file);
    if (component.enabled)
		component.addOperation("Execute",native_path,"/silent");
    component.addOperation("Delete",native_path);
}
