Quote:

Hi all,
this is another auto locking program which utilizes the Windows Locking.

It can be considered as an add-on to other programs which provide the User Interface and also an ‘In Call Locker’.

It can be activated at the following events:
1. After a specified period of idle time (no tapping or touching the keyboard).
2. After the device has waken up.
3. During a call (“In-Call Locking” Partial or Full).

Also for any of the first 2 events (idle or wake up) 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

– LockWhileOnExternalPwr=0 or 1 (Default is 0)
If set to 1 it will try to apply the lock even while running on external power.

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

– LockAfterIdleSeconds=xxx (Default is 45)
xxx are in seconds the inactivity timeout before a lock is applied (not during call).

– LockDuringCall=0 or 1 (“In-Call Locking” Partial or Full). (Default is 0)
If set to 1 it will try to apply the lock. The first time the call is initiated the locked will be instant.
This lock is partial and still allows for the keys of the phone to be used (Usuall case of windows lock).
The user is given the chance to unlock while the call is taking place.
After unlocking, the program will use the parameter
–LockAfterIdleSecondsInCall=xxx (Default is 10)
where xxx is the second to reply the lock while the call is still on.

Also while having LockDuringCall=1, if the next parameter:
–LockDeviceDuringCall=0 or 1 (Default is 0)
is set to 1, then the lock is a Full lock and the device should not react in any keystroke.

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

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

– ShowTodayAfterLock=0 or 1 (Default is 1)

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

— AfterTodayRunFilePath=XXX (Default is blank)
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 (Default is blank)
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 (Default is blank)
XXX (if not left blank) it can be an executable/registed file which will be run after the lock.
— AfterLockRunFileParm=XXX (Default is blank)
XXX (if not left blank) they are the command line arguments of the previous option.

>>>>> If you change any of the parameters the program will need to be restarted (Re-run it as mentioned further on).

To install it:
> copy the csdevctrl.exe to a folder

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

To stop it:
> 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_MACHINESoftwareCSDevCtrl

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)

Cheers
Chris

P.S:
v.3.0 is still on beta any comments etc are welcomed.

Log:
08/05 – v3.0(Beta) – Implemented timeout and In-call support-Removed bluetooth.
03/05 – v2.5 – Added option to lock only if bluetooth is on after wake
01/05 – v2.4 – Default Registry entries are created with the initial run of the program.
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