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

Contributor Icon Contributed by wwilliamson Date Icon January 11, 2006  
Tag Icon Tagged: 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.

Previous recipe | Next recipe |
 
  • Anonymous
    All 4 of the shortcuts above can be useful. As for the first 3, heed the warnings provided. They are not for general use.

    The last one can be useful but not for what the article describes. Windows has a set of system maintenance tasks that normally run every 3 days. These run during idle time so will not interfore with normal use. Idle time is defined as a period of 15 minutes with zero CPU usage and no user interaction. The command in question will run these tasks immediately.

    Few desktop users will have a use for this command. But for laptop users this is a different story. Due to power management these systems will rarely be in an idle mode and the idle tasks may never run. The command will allow the user to manually start them.

    The command does not terminate any idle tasks, nor does it free memory. By definition, idle tasks run during idle time and can not interfere with normal use. The command may require up to 15 minutes to complete and there will be no notification when done. Disk and CPU activity may be high so you do not want to do this prior to running an intensive task.

    References:
    http://home.comcast.net/~SupportCD/XPMyths.html

    Larry Miller
    Microsoft MCSA
  • 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 !!
  • qwertyzzz18
    Try checking the mem/cpu after 15-20 minutes.
blog comments powered by Disqus