Skip to content

Instantly share code, notes, and snippets.

@michaellwest
Created January 24, 2014 21:07
Show Gist options
  • Save michaellwest/8606455 to your computer and use it in GitHub Desktop.
Save michaellwest/8606455 to your computer and use it in GitHub Desktop.
Copy the selected image to the clipboard. This allows you to paste the image content into an email or other programs.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\pngfile\shell\Copy image to clipboard]
@="Copy image to clipboard"
[HKEY_CLASSES_ROOT\pngfile\shell\Copy image to clipboard\command]
@="C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -Command \"Add-Type -AssemblyName 'PresentationFramework','PresentationCore';[System.Windows.Clipboard]::SetImage((New-Object System.Windows.Media.Imaging.BitmapImage ([System.Uri]'%1')))\""
[HKEY_CLASSES_ROOT\jpegfile\shell\Copy image to clipboard]
@="Copy image to clipboard"
[HKEY_CLASSES_ROOT\jpegfile\shell\Copy image to clipboard\command]
@="C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -Command \"Add-Type -AssemblyName 'PresentationFramework','PresentationCore';[System.Windows.Clipboard]::SetImage((New-Object System.Windows.Media.Imaging.BitmapImage ([System.Uri]'%1')))\""
[HKEY_CLASSES_ROOT\Paint.Picture\shell\Copy image to clipboard]
@="Copy image to clipboard"
[HKEY_CLASSES_ROOT\Paint.Picture\shell\Copy image to clipboard\command]
@="C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -Command \"Add-Type -AssemblyName 'PresentationFramework','PresentationCore';[System.Windows.Clipboard]::SetImage((New-Object System.Windows.Media.Imaging.BitmapImage ([System.Uri]'%1')))\""
[HKEY_CLASSES_ROOT\gifffile\shell\Copy image to clipboard]
@="Copy image to clipboard"
[HKEY_CLASSES_ROOT\gifffile\shell\Copy image to clipboard\command]
@="C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -Command \"Add-Type -AssemblyName 'PresentationFramework','PresentationCore';[System.Windows.Clipboard]::SetImage((New-Object System.Windows.Media.Imaging.BitmapImage ([System.Uri]'%1')))\""
[HKEY_CLASSES_ROOT\TIFImage.Document\shell\Copy image to clipboard]
@="Copy image to clipboard"
[HKEY_CLASSES_ROOT\TIFImage.Document\shell\Copy image to clipboard\command]
@="C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -Command \"Add-Type -AssemblyName 'PresentationFramework','PresentationCore';[System.Windows.Clipboard]::SetImage((New-Object System.Windows.Media.Imaging.BitmapImage ([System.Uri]'%1')))\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment