Quote:

Hi all,
this is just another auto locking program.

The difference is that it uses the Windows Lock and it can be activated:
a. A few seconds after the screen has deemed (Backlight has been reduced due to user inactivity) and/or
b. After the device has waken up.
Also during the above the program can run a specified executable/registered file together with any command line arguments that might be required.

The behavior of this program is driven by the next key/values:

> Key
HKEY_LOCAL_MACHINESoftwareCSDevCtrlOptions

> Values

– LockAfterWake=0 or 1
If set to 1 it will lock the device after the device has waken (not soft reset).

– DelayBeforeLockMsAfterWake=250
Time in ms to wait before applying the lock from wake and running any program (no need to change).

– LockAfterDim=0 or 1
If set to 1 it will lock the device after the screen has dimmed (user inactive).

– DelayBeforeLockMs=250
Time in ms to wait before applying the lock from dim and running any program (no need to change)

– LockAfterDimSeconds=10
Time in seconds to wait before applying the lock once the screen has dimmed.

– ShowTodayAfterLock=0 or 1

If set to 1 it will bring the Windows Today Screen after applying the user selected lock.

— AfterTodayRunFilePath=XXX
XXX (if not left blank) it can be an executable/registed file which will be run after the lock and the Today focus
— AfterTodayRunFileParm=XXX
XXX (if not left blank) they are the command line arguments of the previous option.
— LockAndBackAfterToday=0 or 1
If set to 1, after unlocking the Today screen will be hidden so that the rest of the windows are visible.

If set to 0 then the next values will be used

— AfterLockRunFilePath=XXX
XXX (if not left blank) it can be an executable/registed file which will be run after the lock.
— AfterLockRunFileParm=XXX
XXX (if not left blank) they are the command line arguments of the previous option.

To install it:
> copy the csdevctrl.exe to a folder
> use the options.reg file included in the zip to create the registry values for your convinient

To run it:
Simply run it and it will spawn at the background as another process

Running the program second time will cause the program to exit (It will show a confirmation window which will close in 3 seconds unless you close it sooner).

To uninstall it, close the process as usual (run it again or kill the process) and delete the file.
Also delete the registry key HKEY_LOCAL_MACHINESoftwareCSDevCtrlOptions

As a note, do not rename the csdevctrl.exe as the uninstall depends on this name.

It has been compiled for WM5 so it should run on both WM5/WM6 (i am using a Kaiser with WM6.1)

Have fun
Chris

Log:

27/04 – v2.3 – Added option to wait before locking after dim. Gives user time to re-act.
26/04 – v2.2 – Using registry for all available options.

http://forum.xda-developers.com/showthread.php?t=386451