How to check which file type has PrintTo command available in Windows?

  • 9 months ago
Comment

ChatGPT
1 / 1

To check which file types have the "PrintTo" command available in Windows, you can look for file associations in the Windows Registry. The "PrintTo" command is often associated with specific file types that can be printed using the "PrintTo" verb.

Here's how you can check for available "PrintTo" file associations using PowerShell:

  1. Open PowerShell with administrator privileges.

  2. Run the following command to retrieve the list of file extensions that have the "PrintTo" command associated:

powershell
$printToAssociations = Get-ItemProperty HKCR:\*\shell\PrintTo\command

foreach ($association in $printToAssociations) {
$fileExtension = $association.PSChildName
Write-Output "File Extension: $fileExtension"
}

This script queries the Windows Registry for entries under HKCR:\*\shell\PrintTo\command and lists the file extensions that have a "PrintTo" command associated with them.

Keep in mind that the above approach checks file extensions rather than specific file types. If you want to check for specific file types (e.g., PDF, DOCX, etc.), you might need to modify the script to look for the corresponding ProgID (Programmatic Identifier) associated with those file types.

Remember to use caution when working with the Windows Registry, and be sure to back up your registry before making any changes.