Publish Zonghengjia Windows 0.4.1 client source
This commit is contained in:
@@ -79,6 +79,14 @@ internal static class InstallationIntegration
|
||||
{
|
||||
stage = InstallationTransaction.Root(stage);
|
||||
if (isolated) target = InstallationTransaction.IsolatedTarget(target);
|
||||
using var hive = Hive();
|
||||
var installedVersion = Read(hive, Key(target, isolated, 1), "DisplayVersion");
|
||||
if (installedVersion is not null)
|
||||
{
|
||||
if (installedVersion.Kind != RegistryValueKind.String)
|
||||
throw new IOException("当前安装版本登记无效,未修改现有程序。");
|
||||
InstallationVersionPolicy.RequireNotDowngrade(version, (string)Decode(installedVersion));
|
||||
}
|
||||
var components = new List<Component>();
|
||||
for (var i = 0; i < 3; i++)
|
||||
{
|
||||
@@ -96,7 +104,6 @@ internal static class InstallationIntegration
|
||||
}
|
||||
components.Add(new(i, InstallationTransaction.Digest(source), previous));
|
||||
}
|
||||
using var hive = Hive();
|
||||
var existed = new bool[2];
|
||||
for (var i = 0; i < 2; i++) { using var key = hive.OpenSubKey(Key(target, isolated, i)); existed[i] = key is not null; }
|
||||
// Never redirect another registered installation by trusting /D alone.
|
||||
|
||||
Reference in New Issue
Block a user