I was trying to make a simple batch file that would hide a window using the ShowWindow function. I've seen many scripts running others functions like RUNDLL32 devmgr.dll DeviceManager_Execute, but I don't know why running rundll32 user32.dll, ShowWindow 115689 0 does not works. It simply doesn't hides the window. Is there some kind of security intervention making this command unable to be executed?
Asked
Active
Viewed 758 times
0
Rafael
- 165
115689the window handle or the PID? TheShowWindowAPI needs the windowHANDLEto the window you wish to show/hide. If it's the PID, you'll have to do some more API trickery (viaEnumWindowsand other API's) to get the window you want and it's associated handle. – txtechhelp Jan 22 '15 at 00:32rundll32doesn't pass parameters to the function in the way you expect. See Under what circumstances can I use rundll32 to invoke a function in a DLL? – Ben N May 08 '16 at 22:13