views:

33

answers:

3

I need to get List of Installed Application on Windows Mobile using C#.

After that, I want to have capability to get notifications when installed application starts, ends etc.

+1  A: 

When an app is installed by wceload, which is the typical install route, then an entry gets added in the registry here:

[HKEY_LOCAL_MACHINE\Software\Apps]

So you can enumerate keys and values here to determine what is installed and where in the file system it resides.

Getting a notification when an app starts is much, much more difficult because the system simply isn't designed to tell you that. The route I'd likely go is to use the Toolhelp API to periodically enumerate the running processes to determine what is new or gone. Microsoft does not provide a Toolhelp implementation, but it's fairly easy to P/Invoke, or you can use something like the SDF, which already has it done.

ctacke
A: 

I got the answer from http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/eb43dce3-8b90-4c15-88bf-3791b4a97a58

Can anyone please refer to above link for my new issue?

Sunil Sharma
A: 

For your second question, instead of GetCurrentProcess(), use GetProcess(string) or GetProcessById(int)

http://msdn.microsoft.com/en-us/library/x8b2hzk8.aspx

To get the process ID, you can p/invoke the ToolHelpAPI. Here's an article explaining that process: http://alexmogurenko.com/blog/programming/windows-cemobile-get-process-list-c/

-PaulH

PaulH