Created
January 13, 2012 16:07
-
-
Save BrendonKoz/1607227 to your computer and use it in GitHub Desktop.
AutoIt Script to enable/disable (toggle on each run) the display of desktop icons on a Windows PC. Can be used to prevent users from clicking on programs before computer is fully loaded if run as a startup application (with a delayed timer).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Func PostMessage($hWnd, $msg, $wParm, $lParm) | |
Return DllCall("user32.dll", "int", "PostMessage", _ | |
"hwnd", $hWnd, _ | |
"int", $msg, _ | |
"int", $wParm, _ | |
"int", $lParm) | |
EndFunc ;==>PostMessage | |
$programManager = WinGetHandle("Program Manager"); | |
PostMessage($programManager, 0x111, 28755, 0); Show/Hide desktop icons (0x0111 is defined as $WM_COMMAND in GUIConstants.au3) | |
PostMessage($programManager, 0x111, 28931, 0); Refresh the desktop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment