Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get Windows 7 sniping tool to run when I hit my PRINTSCREEN keyboard button with AUTOHOTKEY.

I have been unsuccessful so far though. Here is what I have for the AutoHotKey script.

I have tried this

PRINTSCREEN::Run, c:\windows\system32\SnippingTool.exe

and this

PRINTSCREEN::Run, SnippingTool.exe

and this

PRINTSCREEN::Run, SnippingTool

And all those give me this error when I hit the PRINTSCREEN button... alt text

It basicly says it cannot find the file, however the file path seems to be correct, I can copy paste it into a window and it opens the snipping tool, any ideas why it will not work?

Here is the full code to my AHK file...

; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win7
; Author:         Jason Davis <friendproject@>
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

PRINTSCREEN = Will run Windows 7 snipping tool
PRINTSCREEN::Run, c:\windows\system32\SnippingTool.exe
share|improve this question
up vote 14 down vote accepted

Are you running a 64-bit version of Windows 7 by any chance?

Windows 7 (as well as Vista I believe) implements what is called WoW64 Filesystem Redirection. If this is the case, you'll want to point AHK to the Sysnative directory:

PrintScreen::Run, "C:\Windows\Sysnative\SnippingTool.exe"
share|improve this answer


PrintScreen::Run C:\Windows\explorer.exe C:\Windows\system32\SnippingTool.exe

This will correctly call the executable withing the boundaries of the WoW64 Filesystem Redirection

share|improve this answer
thanks mate.... – tumchaaditya Sep 12 '12 at 3:51

You can determine if you need to call SnippingTool.exe from the Sysnative or the windows32 based on whether autohotkey is running as a Wow64 process or not.


; Determines if we are running a 32 bit program (autohotkey) on 64 bit Windows
   hProcess := DllCall("kernel32\GetCurrentProcess")
   ret := DllCall("kernel32\IsWow64Process", "UInt", hProcess, "UInt *", bIsWOW64)
   return ret & bIsWOW64

; Launch snipping tool using correct path based on 64 bit or 32 bit Windows
        Run, %windir%\Sysnative\SnippingTool.exe
        Run, %windir%\system32\SnippingTool.exe

More info and source for IsWow64Process here:

share|improve this answer
I used %A_WinDir% instead of %windir% ,with the #noEnv setting disabled. – jiggunjer Jan 15 at 6:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.