﻿<ApplicationDef>
	<Application>
		<Name>Yandex Telemost (User-x64)</Name>
		<Description>Yandex.Telemost lets you set up video meetings by link. Organize work conferences, chat with family, and host video parties in Yandex.Telemost. There are no time limits. You can chat for as long as you want without worrying that the meeting will end soon.</Description>
		<LocalizedName>Yandex Telemost (User-x64)</LocalizedName>
		<Publisher>Yandex</Publisher>
		<AdminDescription>CMPackager build</AdminDescription>
		<AutoInstall>True</AutoInstall>
		<UserDocumentation>https://yandex.ru/support/yandex-360/customers/telemost/web/</UserDocumentation>
		<OptionalReference>https://yndx-infrawin.gitlab.yandexcloud.net/INFRAWIN/infrawin_automation_scripts/-/tree/master/SCCM/CMPackager/Recipes</OptionalReference>
		<!-- LinkText - [String] Specifies a description that appears in the Application Catalog with a hyperlink to additional information or documentation for the application. -->
		<!-- PrivacyUrl - [String] Hyperlink, in URI format, to privacy information about the application. -->
		<!-- Owner - [String] Owner for Application -->
		<!-- SupportContact - [String] Support Contact for Application -->
		<Icon>YandexTelemost.png</Icon>
		<!-- AdminCategories - [String] Comma Delimited Categories in the Console -->
		<!-- UserCategories - [String] Comma Delimited Categories for Software Center -->
		<Keywords>Yandex;Telemost;Яндекс;Телемост</Keywords>
		<!-- FeaturedApplication - [Boolean] Display as a Featured Application and Hightlight in the Company Portal -->
		<!-- DisplaySupersedence - [Boolean] Allows Users to See Deployments Superceded Appplications in Software Center -->
		<FolderPath>CMPackager</FolderPath>
		<FilterFolderPath>True</FilterFolderPath> <!-- FilterFolderPath - [Boolean] Search/Update/Supersiding application only in FolderPath folder -->
		<FullName/>
		<LatestName>Yandex Telemost (User-x64) - Latest</LatestName>
	</Application>
	<Downloads>
		<Download DeploymentType="DeploymentType1">
			<PrefetchScript>
				$Link = &quot;https://cloud-api.yandex.net/v1/telemost/clients/goloom-win64/installer?build=stable&quot;
				$JSON = Invoke-RestMethod -Uri $Link -UserAgent &apos;Mozilla/5.0 (Windows NT 10.0; Win64; x64)&apos;
				$URL = $JSON.file
				$Download.Version = $JSON.version
			</PrefetchScript>
			<!-- <URL>https://webdav.yandex.ru/share/dist/TelemostGoloomSetup_x64.exe</URL> -->
			<DownloadFileName>TelemostGoloomSetup_x64.exe</DownloadFileName>
			<Version/>
			<FullVersion/>
			<DownloadVersionCheck>[string]$Version = ((Get-item $TempDir\$DownloadFileName).VersionInfo.FileVersion).Trim()</DownloadVersionCheck>
			<!--<AppRepoFolder>x64</AppRepoFolder>-->
			<ExtraCopyFunctions/>
			<RequireHigherVersion>True</RequireHigherVersion>
		</Download>
	</Downloads>
	<DeploymentTypes>
		<DeploymentType Name="DeploymentType1">
			<DeploymentTypeName>Yandex Telemost (x64) user level</DeploymentTypeName>
			<InstallationType>Script</InstallationType>
			<CacheContent>False</CacheContent>
			<BranchCache>True</BranchCache>
			<ContentFallback>True</ContentFallback>
			<OnSlowNetwork>Download</OnSlowNetwork>
			<InstallProgram>&quot;TelemostGoloomSetup_x64.exe&quot; -disablestartprogram -nodesktop -install -silent</InstallProgram>
			<UninstallCmd>&quot;%APPDATA%\Yandex\YandexTelemost\$Version\TelemostInstaller.exe&quot; -uninstallcomplete -silent</UninstallCmd>
			<RepairCmd>&quot;TelemostGoloomSetup_x64.exe&quot; -disablestartprogram -nodesktop -install -silent</RepairCmd>
			<UninstallOption>NoneRequired</UninstallOption>
			<Force32bit>False</Force32bit>
			<InstallationBehaviorType>InstallForUser</InstallationBehaviorType>
			<!--<LogonReqType>WhetherOrNotUserLoggedOn</LogonReqType>-->
			<UserInteractionMode>Hidden</UserInteractionMode>
			<ReqUserInteraction>False</ReqUserInteraction>
			<EstRuntimeMins>10</EstRuntimeMins>
			<MaxRuntimeMins>30</MaxRuntimeMins>
			<RebootBehavior>BasedOnExitCode</RebootBehavior>
			<DetectionMethodType>Custom</DetectionMethodType>
			<CustomDetectionMethods>
				<DetectionClause>
					<DetectionClauseType>RegistryKeyValue</DetectionClauseType>
					<Hive>CurrentUser</Hive>
					<KeyName>SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YandexTelemost</KeyName>
					<ValueName>DisplayVersion</ValueName>
					<PropertyType>Version</PropertyType>
					<ExpressionOperator>GreaterEquals</ExpressionOperator>
					<ExpectedValue>$Version</ExpectedValue>
					<Value>True</Value>
					<Is64Bit>True</Is64Bit>
				</DetectionClause>
			</CustomDetectionMethods>
			<RequirementsRules>
				<RequirementsRule>
					<RequirementsRuleType>Existential</RequirementsRuleType>
					<RequirementsRuleValue>
						<RuleValue>True</RuleValue>
					</RequirementsRuleValue>
					<RequirementsRuleGlobalCondition>AutoPackage - OSArchitecture x64</RequirementsRuleGlobalCondition>
				</RequirementsRule>
			</RequirementsRules>
			<InstallBehavior>
			<!--InstallBehavior - Add Entries to the "Install Behavior" Tab in the Deployment Type. SCCM will check if these applications are running before starting the install process. NOTE: A single "Install Behavior" Entry must be defined in the "Requirements Template" Application before this process will work-->
				<InstallBehaviorProcess DisplayName="Yandex Telemost">
				<!--InstallBehaviorExe - The executable that SCCM should check if running before beginning the install process1`-->
					<InstallBehaviorExe>YandexTelemost.exe</InstallBehaviorExe>
				</InstallBehaviorProcess>
			</InstallBehavior>
		</DeploymentType>
	</DeploymentTypes>
	<Supersedence>
		<Supersedence>True</Supersedence>
		<Uninstall>False</Uninstall>
		<KeepSuperseded>2</KeepSuperseded>
		<CleanupSuperseded>True</CleanupSuperseded>
	</Supersedence>
	<Distribution>
		<DistributeContent>True</DistributeContent>
	</Distribution>
	<Deployment>
		<DeploySoftware>True</DeploySoftware>
	</Deployment>
</ApplicationDef>