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

  • Question

  • 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.

    Wednesday, October 6, 2010 6:17 AM

Answers

  • Hi Chintanpshah,

    Windows Mobile 5.0 or above device using managed code you can also get the installed application list using the ConfigurationManager class.
    In this case you have to add a reference to the Microsoft.WindowsMobile.Configuration assembly and use below code snippet.

    Code Snippet:

    private void button1_Click(object sender, EventArgs e)
          {
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(@"<wap-provisioningdoc> <characteristic-query type=""UnInstall""/></wap-provisioningdoc>");
            // Query the OS for the list of uninstallable applications
            doc = ConfigurationManager.ProcessConfiguration(doc, true);
    
            // Display the name of each installed application
            foreach (XmlNode n in doc.SelectNodes("wap-provisioningdoc/characteristic[@type='UnInstall']/characteristic/@type"))
            {
              MessageBox.Show(n.InnerText, "Application Installed on Device");
            }
          }
    

    Hope it helps.


    If you find my post is helpful for you then mark as a answer.
    Wednesday, October 6, 2010 11:47 AM

All replies

  • Hi Chintanpshah,

    Windows Mobile 5.0 or above device using managed code you can also get the installed application list using the ConfigurationManager class.
    In this case you have to add a reference to the Microsoft.WindowsMobile.Configuration assembly and use below code snippet.

    Code Snippet:

    private void button1_Click(object sender, EventArgs e)
          {
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(@"<wap-provisioningdoc> <characteristic-query type=""UnInstall""/></wap-provisioningdoc>");
            // Query the OS for the list of uninstallable applications
            doc = ConfigurationManager.ProcessConfiguration(doc, true);
    
            // Display the name of each installed application
            foreach (XmlNode n in doc.SelectNodes("wap-provisioningdoc/characteristic[@type='UnInstall']/characteristic/@type"))
            {
              MessageBox.Show(n.InnerText, "Application Installed on Device");
            }
          }
    

    Hope it helps.


    If you find my post is helpful for you then mark as a answer.
    Wednesday, October 6, 2010 11:47 AM
  • Thank you. I was able to get List of Installed application as well as notifications when installed application starts or ends using SystemProperty.ActiveApplication.

    Now, I need to Kill some applications (Games etc) when they are started. The problem is that System.Diagnostics.Process.GetCurrentProcess().Kill() kills my application instead of currently active (e.g. Game) application. System.Diagnostics.Process can Kill applications using only ProcessId but not with ProcessName. SystemProperty.ActiveApplication just gives the Application Name not ProcessId.

    If I monitor Processes, I may have to monitor some system processes which are not required to monitor. Anybody has idea on how to Kill Application (not process) using ApplicationName. Or any function to get ProcessId from ApplicationName?

    Let me know if I have to ask a new question for this.

    Thursday, October 7, 2010 4:29 AM
  • Thanks.. But How to get the List of installed application on Device, using .netCF. I dont want to run a Windows client software. Just a standalone device application.
    Monday, February 21, 2011 4:50 AM
  • Please post the sample code .
    Wednesday, February 12, 2014 11:26 AM