Shortcuts: Clear Memory, Lock Workstation, Restart, Shutdown, Change Icon

Posted January 11, 2006 by wwilliamson in Windows

Recently, while I was tweaking the Windows installed on my laptop, I discovered four shortcuts which I thought were cool and decided to pass them along.
The first is a shortcut to shut the system down. Caution when using this one as it gives no prompt after being run it simply ends all processes and calls the command to power down the system. Any unsaved data will be lost. These should work in both vista and XP.
The second is similar except that it reboots the system. Since it does its job in the same way as the first one you should take the same caution in using it.
The third logs of the current user.
Note that none of these first three will ask you if your sure you want to execute them, they simply do what their told: kind of a “Don’t pass go, don’t collect $200” thing. If you run, say, the restart shortcut, it will simply restart the system; no dialogue boxes, no second chance, no stopping it. USE WITH CAUTION.
The forth shortcut runs a system32 dll file which, to the best of my knowledge examines all running processes and if any are idle it is should free up whatever memory they were using. This should be handy if you want to run a 3d application or other memory-intensive task on a system with not much memory. Simply run the shortcut before you start the application and then after a few seconds start the application itself.


Create a new shortcut:

    Rightclick the desktop or any folder and select New/Shortcut from the context menu.
    On the shortcut dialogue box enter the location of the file you wish the shortcut to run as well as any commandline args and click Next.
    On the next screen enter the name you would like displayed underneath the shortcut and click Finish.

Change a shortcut’s icon.

    Right-click the shortcut and select Properties from the context menu.
    On the shortcut’s Properties dialogue box click the Change Icon button.[
    The Change Icon dialogue box will appear and usually will be pointed to the file
      %SystemRoot%\system32\SHELL32.dll

    .
    NOTE: SHELL32.dll has a lot of nice standard windows icons in it and if you use one of them and later on change your theme, the shortcut’s icon will change automatically as well. If you don’t like any of those icons then browse around the filesystem and you will quickly discover that nearly every dll file in the harddrive has an icon you can choose and some have more than one. If you have a programming package of any kind it will usually contain a large number of icons you may use as well.
    After selecting the icon you like click OK to close that dialogue and click OK to close the shortcut’s dialogue box.

Create Shutdown shortcut.

    Create a new shortcut.
    Enter the following for the location:
      %windir%\system32\Shutdown.exe -s -t 00

    Set the name to something descriptive like, I don’t know… Shutdown. and click Finish.
    Change the icon if you would like, otherwise it will use the icon reserved for dll files. I used the red button from SHELL32.dll which is used on the Start Menu to shut the system down.

Create Restart shortcut.

    Create a new shortcut.
    Enter the following for the location:
      %windir%\system32\Shutdown.exe -r -t 00

    Set the name to something like Restart and click Finish.
    Change the icon if you would like otherwise it will use the icon reserved for dll files. I used the blue button from SHELL32.dll which is used on the Start Menu to restart the system down.

Create Lock Workstation shortcut.

    Create a new shortcut.
    Enter the following for the location:
      %windir%\system32\Rundll32.exe User32.dll,LockWorkStation

    Set the name to something like Lock and click Finish.
    Change the icon if you would like, otherwise it will use the icon reserved for dll files. I used the yellow button from SHELL32.dll which is used on the Start Menu to lock the desktop.

Create clear memory shortcut.

    Create a new shortcut.
    Enter the following for the location:
      %SystemRoot%\system32\rundll32.exe advapi32.dll,ProcessIdleTasks

    Set the name to something Clearmem and click finish.
    Change the icon if you would like otherwise it will use the icon reserved for dll files.

The Conversation

Follow the reactions below and share your own thoughts.

  • no way

    clear memory shortcut – completely worthless.
    looking at task manager, it’s INCREASED significantly, memory usage (about 10%)!!!
    was at 2.60GB now up to 3.30GB !!

    • Anonymous

      Try checking the mem/cpu after 15-20 minutes.

  • http://www.drinkingwithbob.com Bob Skywalker

    This Clear Memory Shortcut: %SystemRoot%\system32\rundll32.exe advapi32.dll,ProcessIdleTasks
    does work!

    Although it only works for Windows XP with very low physical memory like my very OLD laptop that only runs on 496 MB of RAM, with Intel Pentium III Mobile CPU at 1,133 MHz, SP3 Home Edition Ver. 2002.

    My other memory slot under the laptop is fried for some reason and so thats why I have so little memory. This laptop only accepts a maximum of 1 GB so naturally I would have the other good memory slot under the keyboard occupied with a 512MB memory stick.

    My recommendation would be to single click this “Clear Memory”desktop shortcut only once a week if needed, I notice a Memory gain of aprox. 30-51 MB – this is awesome since I only have about 225 MB available memory to work with.

    The first time I clicked on this – I got a gain from 225 MB of available memory to 276 MB!!

    So, yea – it works!