TelegramExporter/run.ps1

29 lines
815 B
PowerShell
Raw Normal View History

$pythonVersion = Invoke-Expression -Command "python -V" 2>&1
$python3Version = Invoke-Expression -Command "python3 -V" 2>&1
$numberVersion = $pythonVersion.Split(" ")
if(![string]::IsNullOrEmpty($pythonVersion))
{
if($numberVersion[1] -like "3*")
{
python telegramexporter.py
2021-01-12 16:24:33 +00:00
Read-Host -Prompt "Press enter to continue..."
}
else
{
Write-Output "Too low Python version found. Please, install a Python version >= 3.6"
2021-01-12 16:24:33 +00:00
Read-Host -Prompt "Press enter to continue..."
}
}
elseif(![string]::IsNullOrEmpty($python3Version))
{
python3 telegramexporter.py
2021-01-12 16:24:33 +00:00
Read-Host -Prompt "Press enter to continue..."
}
else
{
Write-Output "No Python versions found. Please, install a Python version >= 3.6"
2021-01-12 16:24:33 +00:00
Read-Host -Prompt "Press enter to continue..."
}