Jump to content

Easy Sleep Timer using NirCMD


Recommended Posts

You will need NirCMD. 

Create 2 Files (3 if you want an easy way to cancel this in the future)

The location for these files is

on Vista C:Users%CurrentUser%

on XP C:Documents and settings%CurrentUser%

    First File

    Save it as  SleepOption1hr.bat

Title Sleep Option 1 Hour

nircmd.exe win hide title "Sleep Option 1 Hour"

nircmd.exe qbox "Do you want to set the sleep timer for 1 hour ?" "Turn Sleep Timer On ?" "sleep1hr.bat"


  Second File

  Save it as    Sleep1hr.bat

Title Sleep Set to 1 Hour

nircmd.exe win min title "Sleep Set to 1 Hour"

nircmd.exe cmdwait 3600000 standby

In order to cancel this end the process NirCMD.exe from the task manager OR create another batch file

  Save it as SleepTimerCancel.bat

taskkill /IM nircmd.exe /F

I have tested this on XP and Vista

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...