Exemplo n.º 1
0
        void CreateUninstallInformation(Model_Uninstall u)
        {
            RegistryKey reg = Registry.LocalMachine.OpenSubKey(u.RegKey, true);

            reg.SetValue("DisplayName", u.DisplayName, RegistryValueKind.String);
            reg.SetValue("DisplayVersion", u.DisplayVersion, RegistryValueKind.String);
            reg.SetValue("EstimatedSize", u.EstimatedSize, RegistryValueKind.DWord);
            reg.SetValue("InstallLocation", u.InstallLocation, RegistryValueKind.String);
            reg.SetValue("Publisher", u.Publisher, RegistryValueKind.String);
            reg.SetValue("UninstallString", u.UninstallString, RegistryValueKind.String);
            reg.SetValue("VersionMajor", u.VersionMajor, RegistryValueKind.DWord);
            reg.SetValue("VersionMinor", u.VersionMinor, RegistryValueKind.DWord);
            reg.SetValue("InstallDate", u.InstallDate, RegistryValueKind.String);
            reg.SetValue("DisplayIcon", u.DisplayIcon, RegistryValueKind.String);
        }
Exemplo n.º 2
0
        void CreateUninstallInformation(Model_Uninstall u)
        {
            RegistryKey reg = Registry.LocalMachine.OpenSubKey(u.RegKey, true);

            reg.SetValue("DisplayName", u.DisplayName, RegistryValueKind.String);
            reg.SetValue("DisplayVersion", u.DisplayVersion, RegistryValueKind.String);
            reg.SetValue("EstimatedSize", u.EstimatedSize, RegistryValueKind.DWord);
            reg.SetValue("InstallLocation", u.InstallLocation, RegistryValueKind.String);
            reg.SetValue("Publisher", u.Publisher, RegistryValueKind.String);
            reg.SetValue("UninstallString", u.UninstallString, RegistryValueKind.String);
            reg.SetValue("VersionMajor", u.VersionMajor, RegistryValueKind.DWord);
            reg.SetValue("VersionMinor", u.VersionMinor, RegistryValueKind.DWord);
            reg.SetValue("InstallDate", u.InstallDate, RegistryValueKind.String);
            reg.SetValue("DisplayIcon", u.DisplayIcon, RegistryValueKind.String);
        }