Click here to Skip to main content
15,892,480 members
Articles / All Topics

iRunAtEvent

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
8 Mar 2010CPOL 12.5K   10
Windows Mobile tool to list and manage notification database entries
DOWNLOAD: iRunAtEvent - Windows Mobile tool to list and edit notification database

This tool will start an application given by the command line at a specified event. On every call, the tool will write a log (iRunAtEvent.log.txt) to the root dir. The arguments supported are:

set appname eventtype   -sets the event eventtype to launch appname

reset appname     -resets ALL events for appname

list              -list all known registered events and the applications to launch

Although there are unsupported events listed in the log file, this does not mean the tool does not support them. In reality, the OEM (in this case tested on an ITC 730) of the device decided not to fire them (drivers are responsible for events to fire). You can simply check with your device by using these unsupported events and see, if they work. Simply use the calculator app in your tests.

To document this in depth, here is a log file of this nice tool here:

01.07.2005 14:05:03:

iRunAtEvent started

================================options
set fullPathExeName event will set app to run at event
sample: iRunAtEvent set "\Windows\pword.exe" NETCONNECT
reset fullPathExeName will reset all events set for app
sample: iRunAtEvent reset "\Windows\pword.exe"
list will dump a list of apps linked to events
sample: iRunAtEvent list
================================
known events:
TIMECHANGE
SYNCEND
ONACPOWER
OFFACPOWER
NETCONNECT
NETDISCONNECT
DEVICECHANGE
IRDISCOVERED
RS232DETECTED
RESTOREEND
WAKEUP
TZCHANGE
MACHINENAMECHANGE
================================
Unsupported Events:
IRDISCOVERED
NETCONNECT
NETDISCONNECT
OFFACPOWER
ONACPOWER
================================
\iRunAtEvent.exe
set
\windows\calc.exe
ONACPOWER
01.07.2005 14:05:03:
success setting event
========== notification registered apps ================
Handle Status AppName Event Type
0×3002eea 0×0 repllog.exe NOTIFICATION_EVENT_NONE
0×6002e32 0×0 CALNOT.EXE NOTIFICATION_EVENT_NONE
0×5000aaf 0×0 clocknot.exe NOTIFICATION_EVENT_NONE
0×1d48 0×0 \\.\Notifications\NamedEvents\SSTimeChange NOTIFICATION_EVENT_TIME_CHANGE
0×6002eb2 0×0 \windows\calc.exe NOTIFICATION_EVENT_ON_AC_POWER <- found ******
0×5002eb6 0×0 \windows\calc.exe NOTIFICATION_EVENT_ON_AC_POWER <- found ******
0×50017dd 0×0 BlueEXE.exe NOTIFICATION_EVENT_WAKEUP
0×5000a02 0×0 btcc.exe NOTIFICATION_EVENT_WAKEUP
0×1d45 0×0 calnot.exe NOTIFICATION_EVENT_TIME_CHANGE
0×1d44 0×0 calnot.exe NOTIFICATION_EVENT_RESTORE_END
0×1d42 0×0 clocknot.exe NOTIFICATION_EVENT_RESTORE_END
0×1d43 0×0 clocknot.exe NOTIFICATION_EVENT_TIME_CHANGE
0×1d46 0×0 connmgr.exe NOTIFICATION_EVENT_TIME_CHANGE
0×1d47 0×0 connmgr.exe NOTIFICATION_EVENT_RS232_DETECTED
0×1d41 0×0 repllog.exe NOTIFICATION_EVENT_RS232_DETECTED
0×1d63 0×0 rtcupdate.exe NOTIFICATION_EVENT_TIME_CHANGE

Download code and binary here.

<!-- Social Bookmarks BEGIN -->

<!-- Social Bookmarks END -->
This article was originally posted at http://www.hjgode.de/wp/2010/03/06/irunatevent

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestioniRunAtEvent.exe - Windows Mobile tool Pin
Maxim Prime14-Mar-12 2:11
Maxim Prime14-Mar-12 2:11 
QuestionAbout iRunAtEvent Pin
Maxim Prime14-Dec-11 6:29
Maxim Prime14-Dec-11 6:29 
AnswerRe: About iRunAtEvent Pin
hjgode14-Dec-11 10:20
hjgode14-Dec-11 10:20 
GeneralRe: About iRunAtEvent Pin
Maxim Prime14-Dec-11 22:02
Maxim Prime14-Dec-11 22:02 
GeneralRe: About iRunAtEvent Pin
hjgode15-Dec-11 6:46
hjgode15-Dec-11 6:46 
GeneralRe: About iRunAtEvent Pin
Maxim Prime15-Dec-11 7:31
Maxim Prime15-Dec-11 7:31 
GeneralRe: About iRunAtEvent Pin
Maxim Prime18-Dec-11 5:26
Maxim Prime18-Dec-11 5:26 
GeneralRe: About iRunAtEvent Pin
hjgode18-Dec-11 10:29
hjgode18-Dec-11 10:29 
GeneralRe: About iRunAtEvent Pin
Maxim Prime19-Dec-11 0:51
Maxim Prime19-Dec-11 0:51 
GeneralRe: About iRunAtEvent Pin
hjgode19-Dec-11 4:36
hjgode19-Dec-11 4:36 
This is a developer forum and you have insight of the source code. The tool is provided as is and as example only.

But, I tested with your args and cannot find a problem:
iRunAtEvent set "\Storage Card\Hibernate.exe" ONACPOWER


this logs to:
================================	19.12.2011 15:30:37:
iRunAtEvent started
==========================================  options  ===========

set fullPathExeName event	will set app to run at event
sample: iRunAtEvent set "\Windows\pword.exe" NETCONNECT

reset fullPathExeName	will reset all events set for app
sample: iRunAtEvent reset "\Windows\pword.exe"

list	will dump a list of apps linked to eventssample: iRunAtEvent list 
================================
known events:
TIMECHANGE
SYNCEND
ONACPOWER
OFFACPOWER
NETCONNECT
NETDISCONNECT
DEVICECHANGE
IRDISCOVERED
RS232DETECTED
RESTOREEND
WAKEUP
TZCHANGE
MACHINENAMECHANGE
================================
Unsupported Events:
IRDISCOVERED
NETCONNECT
NETDISCONNECT
OFFACPOWER
ONACPOWER
================================
\Program Files\iRunAtEvent\iRunAtEvent.exe
set
\Storage Card\Hibernate.exe
ONACPOWER
	19.12.2011 15:31:33:
succes setting event========== notification registered apps ================
Handle	Status	AppName	Event Type
0x3500001d	0x0	\Windows\DoHibernate.exe	NOTIFICATION_EVENT_NONE
0x3100000e	0x0	\Windows\calupd.exe	NOTIFICATION_EVENT_NONE
0x3200000a	0x0	sqmevent.exe	NOTIFICATION_EVENT_NONE
0x3f000015	0x0	\windows\enrollnot.exe	NOTIFICATION_EVENT_NONE
0x36000024	0x0	CALNOT.EXE	NOTIFICATION_EVENT_NONE
0x3800002e	0x0	ceipui.exe	NOTIFICATION_EVENT_NONE
0x3a000020	0x0	clocknot.exe	NOTIFICATION_EVENT_NONE
0x30000010	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3200001c	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3c00001a	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3f000018	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3c000027	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x34000011	0x0	\\.\Notifications\NamedEvents\WLMScheduler_TimeChangeEvent	NOTIFICATION_EVENT_TZ_CHANGE
0x34000012	0x0	\\.\Notifications\NamedEvents\WLMScheduler_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3f000021	0x0	\Storage Card\Hibernate.exe	NOTIFICATION_EVENT_ON_AC_POWER <- found ******
0x30000008	0x0	calnot.exe	NOTIFICATION_EVENT_RESTORE_END
0x30000009	0x0	calnot.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x3b00002f	0x0	ceipui.exe	NOTIFICATION_EVENT_TZ_CHANGE
0x3d00000f	0x0	ceipui.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000007	0x0	clocknot.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000006	0x0	clocknot.exe	NOTIFICATION_EVENT_RESTORE_END
0x30000004	0x0	repllog.exe	NOTIFICATION_EVENT_LAST
0x30000005	0x0	repllog.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000003	0x0	repllog.exe	NOTIFICATION_EVENT_RS232_DETECTED
0x30000014	0x0	Tskschedule.exe	NOTIFICATION_EVENT_TZ_CHANGE
0x30000013	0x0	Tskschedule.exe	NOTIFICATION_EVENT_TIME_CHANGE


Then I do a reset using:
iRunAtEvent reset "\Storage Card\Hibernate.exe"


and get this log (showing everything OK):
================================	19.12.2011 15:34:35:
iRunAtEvent started
==========================================  options  ===========

set fullPathExeName event	will set app to run at event
sample: iRunAtEvent set "\Windows\pword.exe" NETCONNECT

reset fullPathExeName	will reset all events set for app
sample: iRunAtEvent reset "\Windows\pword.exe"

list	will dump a list of apps linked to eventssample: iRunAtEvent list 
================================
known events:
TIMECHANGE
SYNCEND
ONACPOWER
OFFACPOWER
NETCONNECT
NETDISCONNECT
DEVICECHANGE
IRDISCOVERED
RS232DETECTED
RESTOREEND
WAKEUP
TZCHANGE
MACHINENAMECHANGE
================================
Unsupported Events:
IRDISCOVERED
NETCONNECT
NETDISCONNECT
OFFACPOWER
ONACPOWER
================================
\Program Files\iRunAtEvent\iRunAtEvent.exe
reset
\Storage Card\Hibernate.exe
========== notification registered apps ================
Handle	Status	AppName	Event Type
0x3900001d	0x0	\Windows\DoHibernate.exe	NOTIFICATION_EVENT_NONE
0x3100000e	0x0	\Windows\calupd.exe	NOTIFICATION_EVENT_NONE
0x3200000a	0x0	sqmevent.exe	NOTIFICATION_EVENT_NONE
0x3f000015	0x0	\windows\enrollnot.exe	NOTIFICATION_EVENT_NONE
0x36000024	0x0	CALNOT.EXE	NOTIFICATION_EVENT_NONE
0x3800002e	0x0	ceipui.exe	NOTIFICATION_EVENT_NONE
0x3a000020	0x0	clocknot.exe	NOTIFICATION_EVENT_NONE
0x30000010	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3200001c	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3c00001a	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3f000018	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3c000027	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x34000011	0x0	\\.\Notifications\NamedEvents\WLMScheduler_TimeChangeEvent	NOTIFICATION_EVENT_TZ_CHANGE
0x34000012	0x0	\\.\Notifications\NamedEvents\WLMScheduler_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3f000021	0x0	\Storage Card\Hibernate.exe	NOTIFICATION_EVENT_ON_AC_POWER <- found ****** <- removed!
0x30000008	0x0	calnot.exe	NOTIFICATION_EVENT_RESTORE_END
0x30000009	0x0	calnot.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x3b00002f	0x0	ceipui.exe	NOTIFICATION_EVENT_TZ_CHANGE
0x3d00000f	0x0	ceipui.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000007	0x0	clocknot.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000006	0x0	clocknot.exe	NOTIFICATION_EVENT_RESTORE_END
0x30000004	0x0	repllog.exe	NOTIFICATION_EVENT_LAST
0x30000005	0x0	repllog.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000003	0x0	repllog.exe	NOTIFICATION_EVENT_RS232_DETECTED
0x30000014	0x0	Tskschedule.exe	NOTIFICATION_EVENT_TZ_CHANGE
0x30000013	0x0	Tskschedule.exe	NOTIFICATION_EVENT_TIME_CHANGE
========== notification registered apps ================
Handle	Status	AppName	Event Type
0x3900001d	0x0	\Windows\DoHibernate.exe	NOTIFICATION_EVENT_NONE
0x3100000e	0x0	\Windows\calupd.exe	NOTIFICATION_EVENT_NONE
0x3200000a	0x0	sqmevent.exe	NOTIFICATION_EVENT_NONE
0x3f000015	0x0	\windows\enrollnot.exe	NOTIFICATION_EVENT_NONE
0x36000024	0x0	CALNOT.EXE	NOTIFICATION_EVENT_NONE
0x3800002e	0x0	ceipui.exe	NOTIFICATION_EVENT_NONE
0x3a000020	0x0	clocknot.exe	NOTIFICATION_EVENT_NONE
0x30000010	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3200001c	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3c00001a	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3f000018	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x3c000027	0x0	\\.\Notifications\NamedEvents\MSPPDUGateway_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x34000011	0x0	\\.\Notifications\NamedEvents\WLMScheduler_TimeChangeEvent	NOTIFICATION_EVENT_TZ_CHANGE
0x34000012	0x0	\\.\Notifications\NamedEvents\WLMScheduler_TimeChangeEvent	NOTIFICATION_EVENT_TIME_CHANGE
0x30000008	0x0	calnot.exe	NOTIFICATION_EVENT_RESTORE_END
0x30000009	0x0	calnot.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x3b00002f	0x0	ceipui.exe	NOTIFICATION_EVENT_TZ_CHANGE
0x3d00000f	0x0	ceipui.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000007	0x0	clocknot.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000006	0x0	clocknot.exe	NOTIFICATION_EVENT_RESTORE_END
0x30000004	0x0	repllog.exe	NOTIFICATION_EVENT_LAST
0x30000005	0x0	repllog.exe	NOTIFICATION_EVENT_TIME_CHANGE
0x30000003	0x0	repllog.exe	NOTIFICATION_EVENT_RS232_DETECTED
0x30000014	0x0	Tskschedule.exe	NOTIFICATION_EVENT_TZ_CHANGE
0x30000013	0x0	Tskschedule.exe	NOTIFICATION_EVENT_TIME_CHANGE


In your line
Run("\Storage Card\iRunAtEvent.exe"," set " & """" & "\Storage Card\Hibernate.exe" & """" & "NETCONNECT")

I am missing a blank space between .exe and NETCONNECT.

(BTW: Most devices do NOT support the NETCONNECT event!)

If you still have problems, please post the logs of your calls.

regards

Josef

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.