Launch SnippingTool.exe from c++ program

I want to run SnippingTool.exe from C++ program. I have Win7 64 bit system. Following code does not work:

CString exe = _T("C:\\Windows\\system32\\SnippingTool.exe");
ShellExecute(NULL, _T("open"), exe, NULL, _T(""), SW_SHOWNORMAL);

It returns with error file not found. The SnippingTool.exe does exist at C:\Windows\system32 folder. I tried to google this issue and found few threads with the same issue but could not find any real solution. If I copy that exe from that location to some other location e.g. D:\Temp, ShellExecute launches the exe properly. But I need to launch it from the original location.

Thanks in advance.
Maybe there is an issue with file system redirection used in x64 version of windows used for x86 processes.

Try to compile your application as 64 bit and see if the problems persists or not.
Topic archived. No new replies allowed.