Sunil Sharma
Sunil Sharma

Reputation: 21

Get List of Installed Applications Windows Mobile (C# Managed)

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.

Upvotes: 1

Views: 1581

Answers (3)

PaulH
PaulH

Reputation: 7863

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

Upvotes: 0

ctacke
ctacke

Reputation: 67198

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.

Upvotes: 1

Related Questions