"Silly program" for moving the mouse and doing other things
Please do not use using namespace std (read this).

Convert magic numbers like 1440 and 900 to global constants with meaningful names. I would do the same for string literals like \\explorer.exe and taskmgr.exe, but maybe that's just me

Your formatting is not consistent. Sometimes you assign variables like pEntry.dwSize = ..., with spaces around =, and sometimes like mouseX= , space only on one side. I suggest to put spaces on both sides, and to be consistent about it.

I would put these two assignments on separate lines for clarity:

mouseX= rand() % 1440; mouseY= rand() % 900;