User Tip #47: Create Lock Desktop Icon

Hits: Failed to execute CGI : Win32 Error Code = 3


You can lock the Windows 2000 or XP desktop with a click of an icon. Create a shortcut icon on the desktop to run the following command:

rundll32.exe user32.dll,LockWorkStation

Rundll32.exe is an application included with Windows that executes functions in dynamic link libraries (DLLs). Most applications (and Windows) use DLLs to share code between multiple applications or multiple modules within a single application. There are lots of other tasks you can accomplish with Rundll32.exe. You can execute these commands from a console or incorporate them into scripts or batch files to help you quickly access certain features in the user interface for configuring the operating system or hardware.

Related tips:

I have seen tips using similar syntax to create a shutdown shortcut icon:

rundll32.exe user32.dll,ExitWindowsEx Actually that tip works for Windows NT but not Windows 2000 or Windows XP. You can use the Resource Kit shutdown.exe for Windows NT, Windows 2000, or Windows XP. See Shutdown Windows NT or Win9x at specific time each day for an example use of Shutdown.exe.




well written. it is essential. or at least very valuable.



A must for support and installations personnel as well as technical savvy users. 1800 pages with a wealth of information on the CD.