Schedule Reset - V1.0

Features

Soft reset of your device every day at a specified time.
Optional warning sound and countdown before actual reset (just in case you are using the device).
Optional execution of a script before the reset to delete garbage files, backup, etc.
Automatical aborting of the script if its execution time exceeds a specified timeout.
Default script engine is nScript (freely available at http://www.s-k-tools.com/util.html).
Other script engine can be used by changing some registry keys.


Requirements

.NET Compact Framework 1. The program has been tested on HTC Magician with WM 2003SE. Please, feel free to the post your experience with different device and operative systems.


Installation

Option 0 - Automatic using the CAB file

Copy ScheduleReset.cab to the "\Windows\Start Menu\Programs" directory on your device and run it.
This will create the directory "\Program Files\ScheduleReset", copy there all required files and create a shortcut named Schedule Reset inside Programs.

Option 1 - Manual

Copy the executable ScheduleReset.exe where you like and create a shortcut to it where you like. Consider that the executable must be accessible when the device is off. Therefore RAM memory is ok and Storage Card is not. Other memory area usability depends on your device type (on HTC Magician Storage area is ok).

Warning: remember to set the "Turn off device if not used" option with the Power settings applet. Otherwise after soft reset the device will remain on possibly exhausting the battery.

Warning: do not move the files after installation without complete uninstall and registry entries deletion (see Advanced usage).


Uninstallation

Do not unistall the program while a scheduled reset is pending: unactivate it using the "Remove" button (see below). After that you can use the Remove Programs settings applet or simply delete the files.


Usage

Activation of scheduled soft reset

Run Schedule Reset.
Select the time (24 hours format) for reset using the two combo boxes under the "Reset time" label.
Set as you like the "Warning Sound" check box to enable or disable the generation of a warning sound before actual reset.
Tap the "Activate" button: the program closes and it is ready to work.

Unactivation of scheduled soft reset

Run Schedule Reset.
At top of the screen a red countdown starts. Tap anywhere to stop it, otherwise after 20 seconds a soft reset sequence will start.
Tap the "Remove" button: the program closes and it is inactive.

Warning: if after tapping "Activate" or "Remove" button a red error message appears at the top of the screen your device is unable to support Schedule Reset. Wait 48 hours and then uninstall Schedule Reset.


Scripting with nScript

nScript is freely available at http://www.s-k-tools.com/util.html Download and install it, then create a file named ScheduleReset.ns containing the script and put it in the same directory where ScheduleReset.exe is.
To test the script run Schedule Reset and stop the reset countdown. Select maximum value for "Script timeout" and use the "Test Script" button to actually run the script. At execution end a message will show the actual execution time.
When you are satisfied with the script select a timeout value larger than the reported execution time and check "Run Script".
The files ScheduleReset.ns.sample1 and ScheduleReset.ns.sample2 are given as samples.

Warning: every time Schedule Reset executes the script it checks for errors and execution timeout and sets a registry flag if they happen. To check it run Schedule Reset, if the registry flag is set a red informative message will be shown at screen right bottom.


Advanced usage - Registry entries

All the registry entries are under HKEY_CURRENT_USER\Software\ScheduleReset

ScriptPath: it is the path of the script file. The default is ScheduleReset.ns prefixed with the directory where the program is installed.
ScriptAppPath: it is the path of the scripting application. The default is null and in that case the script file will be run using the application associated with its extension (nScript for .NS extension). If a program file path is inserted the path of the script file will be passed to it using the ScriptAppArgs formatting string.
ScriptAppArgs: it is used to build the parameters to be passed to the scripting application specified with ScriptAppPath. The default is /o "{0}" that is suitable for nScript. {0} is the placeholder for the script file path.
SoundFilePath: it is the path of the WAV file used as warning sound. The default is "\Windows\Voicbeep.wav".

The other registry entries are managed by the programs and should not be altered.




