Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

get all installed application in windiws in C#

public class InstalledProgram
{
    public string DisplayName { get; set; }
    public string Version { get; set; }
    public string InstalledDate { get; set; }
    public string Publisher { get; set; }
    public string UnninstallCommand { get; set; }
    public string ModifyPath { get; set; }
}
Comment

get all installed application in windiws in C#

List<InstalledProgram> installedprograms = new List<InstalledProgram>();
    string registry_key = @"SOFTWAREMicrosoftWindowsCurrentVersionUninstall";
    using (RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key))
    {
        foreach (string subkey_name in key.GetSubKeyNames())
        {
            using (RegistryKey subkey = key.OpenSubKey(subkey_name))
            {
                if (subkey.GetValue("DisplayName") != null)
                {
                    installedprograms.Add(new InstalledProgram
                    {
                        DisplayName = (string)subkey.GetValue("DisplayName"),
                        Version = (string)subkey.GetValue("DisplayVersion"),
                        InstalledDate = (string)subkey.GetValue("InstallDate"),
                        Publisher = (string)subkey.GetValue("Publisher"),
                        UnninstallCommand = (string)subkey.GetValue("UninstallString"),
                        ModifyPath = (string)subkey.GetValue("ModifyPath")
                    });
                }
            }
        }
    }
Comment

get all installed application in windiws in C#

ManagementObjectSearcher s = new ManagementObjectSearcher("SELECT * FROM Win32_Product");
Comment

PREVIOUS NEXT
Code Example
Shell :: fallocate 10mb command 
Shell :: mac unzip terminal 
Shell :: git, repository, new repository 
Shell :: crontab syntax 
Shell :: certbot command 
Shell :: re-entering top level after c stack overflow 
Shell :: rubocop command to run auto correct 
Shell :: ubuntu install kde partition manager 
Shell :: command to install the fire-base tools 
Shell :: git credential.helper does not store username password 
Shell :: git stash pop resolve conflict 
Shell :: E: Unable to locate package rvm 
Shell :: ubuntu command to alt + f2 r 
Shell :: how to kill looped process by command name 
Shell :: what is linux 
Shell :: update n98-magerun2 
Shell :: dhcpcd.service does not exist 
Shell :: linux remove non empty directory 
Shell :: awk csv rows to column 
Shell :: install avagadro on linux 
Shell :: how to setup promethus on docker 
Shell :: scaffold key 
Shell :: fast downloader command line 
Shell :: pip3 install requirements.txt 
Shell :: Remove directory/folder locally and git 
Shell :: how to turn on wireguard 
Shell :: removing an initialized git 
Shell :: how to skip .pyc file adding into github repository 
Shell :: install homebre windows 
Shell :: convert to png images liunx 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =