Copyright © 2003-2010 by Prof. Timo Salmi  
Last modified Mon 17-May-2010 21:39:00

Assorted NT/2000/XP/.. CMD.EXE Script Tricks
From the html version of the tscmd.zip 1cmdfaq.txt file
To the Description and the Index

This page is edited from the 1cmdfaq.txt faq-file contained in my tscmd.zip command line interface (CLI) collection. That zipped file has much additional material, including a number of detached .cmd script files. It is recommended that you also get the zipped version as a companion.

Please see "The Description and the Index page" for the conditions of usage and other such information.

121} How do I make a simple reminder to pop up on the desktop?

Below is a simplified version. Only one rendition can be running at a time. A somewhat more comprehensive version, with multiple calls allowed, is included in the tscmd.zip FAQ collection as WAKEUP.CMD

  @echo off & setlocal enableextensions
  echo First customize the two instances of C:\_M\TEMP\wakeup.vbs
  echo And remove the first two echo lines and the first goto :EOF
  goto :EOF
  :: Usage

  if [%1]==[] (
    echo Usage: %~f0 [HH:MM]
    echo No error checking
    goto :EOF)
  :: Build a Visual Basic Script

  set skip=
  set vbs_=C:\_M\TEMP\wakeup.vbs
  findstr "'%skip%VBS" "%~f0" > "%vbs_%"
  :: Run the Visual Basic Script

  at %1 /interactive "%vbs_%"
  endlocal & goto :EOF
  'The Visual Basic Script

  Dim WshShell, fso 'VBS
  Set WshShell = WScript.CreateObject("WScript.Shell") 'VBS
  Set fso = CreateObject("Scripting.FileSystemObject") 'VBS
  WshShell.Run "sndrec32 /play /close C:\WINDOWS\Media\tada.wav", 2, false 'VBS
  WScript.Echo "Time to wake up" 'VBS
  fso.DeleteFile("C:\_M\TEMP\wakeup.vbs") 'VBS

An example of the immediate output. For more on the "at" usage apply AT /?

The actual output on the desktop looks like this

Should you wish to cancel the above job before it is executed apply
  AT 1 /delete

  hh ntcmds.chm::/at.htm