Friday, November 6, 2009

create batch file for shutdown and restart

This will show you how to create batch file to shutdown or restart your pc, also you can schedule it by any given time, follow these steps.


Create batch file for shutdown (with shutdown message box)

  • First create new text document
  • Now inside text document type c:\windows\system32\shutdown -s -f -t 300 (the value 300 is 5 min, (60 x 5) if you want you can raise or reduce the value or put 00 for immediate shutdown)
  • Now save the file as with the extension of .bat (ex- shutdown.bat)
  • Important - make sure you uncheck "hide extensions for known file types" in folder option before naming the batch file. otherwise it wont create batch file,it will create only text file named as shutdown.bat.txt

Create batch file for restart

  • First create new text document
  • Now inside text document type shutdown -r -f -t 300 (if you want restart immediately without countdown set value to 00)
  • Now save the file as with the extension of .bat (ex- restart.bat)

Create schedule for shutdown

  • Open schedule task folder (start > run > type tasks > press enter)
  • Double click add schedule task
  • Click next
  • Click browse button
  • Specify the shutdown.bat file we created
  • In the name field type anything, and select the action under "perform this task"
  • Now proceed with the schedule task, and click finish at the end.

Note - to immediately cancel shutdown or restart job, type shutdown.exe -a in run command and press enter.

customize "send to" items in windows xp

You know you can customize "send to" menu and you can add more new destination in Send To lists. this can be done in a simple way, follow these steps.

  • Click start, click run
  • Type sendto and press enter
  • This will open window with default Send To lists (Compressed (zipped) Folder, Desktop (create shortcut), Mail Recipient, My Documents)
  • Now drag-and-drop any program, folders and drives, shortcuts to this folder
  • For example - we take Microsoft word program, go to the program installation folder, find winword and drag-and-drop it to the send to folder
  • Now to verify new location, right click on a text or a wordpad document, point to send to, click winword
  • This will open the selected file with the Microsoft word

disable automatic update and service

If you want to disable automatic updates for windows you can do it by in control panel or system properties, but you know that even if you turn off updates in here automatic update service will continue to run in background. in order to disable this service follow these steps.

  • Click start , click run
  • Type services.msc and press enter
  • Now find the automatic update service and double click to open it
  • Now stop the service by pressing stop button under "service status"
  • Then under "startup type" select disable
  • Click apply and ok
From now on "windows update" and "windows update service" will be stop

restore missing tabs in "display properties"

In windows xp sometimes you notice that your "display properties" tabs were missing suddenly. (actually sometimes hides itself) such as "Themes , Desktop, Screen saver, Appearance, Settings" ,this can happen for many reasons, the exact cause for this is yet to be found, but we know how to restore the missing tabs in display properties, follow these steps.

  • Click Start, click Run
  • Type regsvr32 themeui and press enter
  • Again Click Start, click Run
  • Type regsvr32 /i shell32 and press enter
Learn more about how to unregister and re-register DLL files