Skip to main content
Glama
ReadMsiSimple.ps1787 B
param([Parameter(Mandatory=$true)][string]$MsiPath) $ErrorActionPreference = 'Stop' if (-not (Test-Path -LiteralPath $MsiPath)) { throw "MSI path not found: $MsiPath" } $installer = New-Object -ComObject WindowsInstaller.Installer $db = $installer.OpenDatabase($MsiPath, 0) function Get-Prop([string]$name) { $view = $db.OpenView("SELECT Value FROM Property WHERE Property='$name'") $view.Execute() | Out-Null $rec = $view.Fetch() if ($rec) { return $rec.StringData(1) } else { return $null } } $meta = [pscustomobject]@{ ProductCode = Get-Prop 'ProductCode' ProductName = Get-Prop 'ProductName' ProductVersion = Get-Prop 'ProductVersion' UpgradeCode = Get-Prop 'UpgradeCode' Manufacturer = Get-Prop 'Manufacturer' } $meta | ConvertTo-Json -Compress

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/henry1042/MSI-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server