Last active
July 26, 2022 07:14
-
-
Save kinuasa/154edc702a93311352179a9375164492 to your computer and use it in GitHub Desktop.
Power Automate for desktopのバージョンを確認するPowerShellスクリプト 関連記事:https://www.ka-net.org/blog/?p=14342
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cd /d %~dp0 | |
PowerShell -NoProfile -ExecutionPolicy Unrestricted .\CheckPADVersion.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Power Automate for desktopのバージョンを確認するPowerShellスクリプト | |
$padInstVersion = (Get-ChildItem -Path ("HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall") | ForEach-Object {Get-ItemProperty $_.PsPath} | Where-Object {($_.DisplayName -eq "Power Automate for desktop") -and ($_.BundleVersion -ne $NULL)}).BundleVersion | |
$padAppxPackage = Get-AppxPackage | Where-Object {$_.Name.ToString() -Like "*PowerAutomate*"} | |
if($padAppxPackage){ | |
$padStoreConsolePath = Join-Path $padAppxPackage.InstallLocation "PAD.Console.Host.exe" | |
if(Test-Path $padStoreConsolePath){ | |
$padStoreVersion = (Get-ItemProperty $padStoreConsolePath).VersionInfo.ProductVersion | |
} | |
} | |
Add-Type -AssemblyName "System.Windows.Forms" | |
[System.Windows.Forms.MessageBox]::Show("インストーラー版:$padInstVersion`r`nストアアプリ版:$padStoreVersion") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment