Automatically open WaniKani when it's review time

Update – I started playing Elder Scrolls IV Oblivion again, and found how annoying it can be when the review notice comes up when you’re doing something important. So here’s a quick way to enable/disable the notice.

1) Create a batch file

This batch will toggle the active status of the scheduled task, so that it will either disable or re-enable the scheduled task.

Open up Notepad and paste this code section in. Change the line near the top from set taskName=WaniKani to suit how you named your scheduled task. Make sure to save the file as a .bat file with the “Save as type” as “All files (*.*)” like demonstrated in step 2 in this post above, and also make sure to save it to a place where you won’t lose it.

ToggleWK.bat
@echo off
set taskName=WaniKani
set uniqueFileName=%tmp%\bat~%RANDOM%%RANDOM%%RANDOM%.tmp
schtasks /Query /TN "%taskName%" /FO list | find "Status:" | find "Ready" /c>%uniqueFileName%
set /p result=<%uniqueFileName%
del /f %uniqueFileName%
if %result% EQU 1 (
    schtasks /change /disable /TN "%taskName%"
    echo The task was disabled.
) else (
    schtasks /change /enable /TN "%taskName%"
    echo The task was enabled.
)
pause

2) Create a shortcut on your desktop

The batch file needs to be run as administrator to be able to change tasks. One way to do this is to create a shortcut and make the shortcut be run as administrator always, like so:

Right-click your batch file and click on Create Shortcut. This will create a shortcut in the folder where the batch file is. If you have a lot of files in the folder and don’t see the shortcut, scroll down to the bottom, or close the window and go back in to the folder.

CreateShortcut

Right-click on the shortcut and click Properties.

Go to the Shortcut tab and click on Advanced…

Advanced

Make sure that the checkbox next to Run as administrator is checked off.

Run%20as%20admin

Hit OK. Optionally, change the icon by hitting Change Icon… When you’re done, hit OK.

Move the shortcut to your desktop, and rename it to something nice.

image

3) Go do something important, disruption-free, like your reviews

Well there you go. Now any time you need to be disruption-free for a while, double-click this shortcut. Just remember to reactivate it when you’re done!