Created
August 22, 2020 09:44
-
-
Save tanaka-geek/c3842216f6715b5de326e56b68accda9 to your computer and use it in GitHub Desktop.
get clsid for Juicy Potato - Copy Script from Ohpe Juciy Potato Project
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
<# | |
This script extracts CLSIDs and AppIDs related to LocalService.DESCRIPTION | |
Then exports to CSV | |
#> | |
$ErrorActionPreference = "Stop" | |
# Importing some requirements | |
. .\utils\Join-Object.ps1 | |
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | |
$CLSID = Get-ItemProperty HKCR:\clsid\* | select-object AppID,@{N='CLSID'; E={$_.pschildname}} | where-object {$_.appid -ne $null} | |
$APPID = Get-ItemProperty HKCR:\appid\* | select-object localservice,@{N='AppID'; E={$_.pschildname}} | where-object {$_.LocalService -ne $null} | |
$RESULT = Join-Object -Left $APPID -Right $CLSID -LeftJoinProperty AppID -RightJoinProperty AppID -Type AllInRight | Sort-Object LocalService | |
# Preparing to Output | |
$OS = (Get-WmiObject -Class Win32_OperatingSystem | ForEach-Object -MemberName Caption).Trim() -Replace "Microsoft ", "" | |
$TARGET = $OS -Replace " ","_" | |
# Make target folder | |
New-Item -ItemType Directory -Force -Path .\$TARGET | |
# Output in a CSV | |
$RESULT | Export-Csv -Path ".\$TARGET\CLSIDs.csv" -Encoding ascii -NoTypeInformation | |
# Export CLSIDs list | |
$RESULT | Select CLSID -ExpandProperty CLSID | Out-File -FilePath ".\$TARGET\CLSID.list" -Encoding ascii | |
# Visual Table | |
$RESULT | ogv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment