This dll is loaded into other processes (not only task manager) using a technique known as Trampoline. If the hook succeeds, the process won't be able to see your process. The dll hooks NtQuerySystemInformation, Process32First, Process32FirstW, Process32Next and Process32NextW.
It's not 100% effective - some processes can find your exe. Console and .NET programs are 2 examples, and there may be others.
But if simply hiding from the task manager is what you need, this may be the way to go.
Be sure to use the correct dll for the operating system: hyde.dll for x86 and hyde64.dll for x64. AHK_L Unicode is required for the example script.
### Example script ###
/* hyde.dll hides a process from the task manager on Windows 2000 - Windows 7 x86 & x64 bit OSes Your process can inject it into other processes however you like. The example uses SetWindowsHookEx with a CBT hook (the dll exports a CBTProc) to inject it into all running processes. Press Esc to exit the script. Note: if you don't compile the script, AutoHotKey.exe gets hidden. Otherwise the name of the .exe gets hidden. */ #NoEnv SetWorkingDir %A_ScriptDir% OnExit, ExitSub hMod := DllCall("LoadLibrary", Str, "hyde.dll", Ptr) ;for x86 ;hMod := DllCall("LoadLibrary", Str, "hyde64.dll", Ptr) ;for x64 if (hMod) { hHook := DllCall("SetWindowsHookEx", Int, 5, Ptr, DllCall("GetProcAddress", Ptr, hMod, AStr, "CBProc", ptr), Ptr, hMod, Ptr, 0, Ptr) if (!hHook) { MsgBox, SetWindowsHookEx failed ExitApp } } else { MsgBox, LoadLibrary failed ExitApp } MsgBox, Process hidden Return Esc::ExitApp ExitSub: if (hHook) DllCall("UnhookWindowsHookEx", Ptr, hHook) if (hMod) DllCall("FreeLibrary", Ptr, hMod) ExitApp
hyde.dll
hyde64.dll
Zip package - both dlls and example script