From 1676f444a4fafe2e905d278a766ab152f1958d22 Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Wed, 11 Dec 2024 11:35:02 +0200 Subject: [PATCH 01/10] add advinst in manifest --- .../JSON/manifests/v1.10.0/manifest.installer.1.10.0.json | 6 ++++-- .../JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json index 98da3b2c34..7dd80b9cb0 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json @@ -65,7 +65,8 @@ "wix", "burn", "pwa", - "portable" + "portable", + "advancedInstaller" ], "description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level" }, @@ -80,7 +81,8 @@ "nullsoft", "wix", "burn", - "portable" + "portable", + "advancedInstaller" ], "description": "Enumeration of supported nested installer types contained inside an archive file" }, diff --git a/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json index dd48208c79..8d7ce92e1e 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json @@ -167,7 +167,8 @@ "wix", "burn", "pwa", - "portable" + "portable", + "advancedInstaller" ], "description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level" }, @@ -182,7 +183,8 @@ "nullsoft", "wix", "burn", - "portable" + "portable", + "advancedInstaller" ], "description": "Enumeration of supported nested installer types contained inside an archive file" }, From c0f880842da8d71c04e531109d1440815556c0e5 Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Wed, 11 Dec 2024 16:57:25 +0200 Subject: [PATCH 02/10] add advinst switches --- .../Workflows/DownloadFlow.cpp | 1 + .../Workflows/InstallFlow.cpp | 2 ++ .../Workflows/RepairFlow.cpp | 2 ++ .../Workflows/UninstallFlow.cpp | 2 ++ .../Manifest/ManifestCommon.cpp | 31 ++++++++++++++++--- .../Public/winget/ManifestCommon.h | 1 + 6 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp b/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp index 084cbb4d3f..2faf1c151e 100644 --- a/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp @@ -48,6 +48,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Portable: + case InstallerTypeEnum::AdvancedInstaller: return L".exe"sv; case InstallerTypeEnum::Msi: case InstallerTypeEnum::Wix: diff --git a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp index e85540c379..64014ef70c 100644 --- a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp @@ -52,6 +52,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Msi: case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Wix: + case InstallerTypeEnum::AdvancedInstaller: return true; default: return false; @@ -406,6 +407,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Msi: case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Wix: + case InstallerTypeEnum::AdvancedInstaller: if (doUninstallPrevious) { context << diff --git a/src/AppInstallerCLICore/Workflows/RepairFlow.cpp b/src/AppInstallerCLICore/Workflows/RepairFlow.cpp index 4bfc1d4a23..3e3e056943 100644 --- a/src/AppInstallerCLICore/Workflows/RepairFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/RepairFlow.cpp @@ -337,6 +337,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Burn: case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: + case InstallerTypeEnum::AdvancedInstaller: { context << RunRepairForRepairBehaviorBasedInstaller; @@ -379,6 +380,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Exe: case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: + case InstallerTypeEnum::AdvancedInstaller: { context << GenerateRepairString; diff --git a/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp b/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp index ce12427900..5c41be931f 100644 --- a/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp @@ -220,6 +220,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Burn: case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: + case InstallerTypeEnum::AdvancedInstaller: { IPackageVersion::Metadata packageMetadata = installedPackageVersion->GetMetadata(); @@ -329,6 +330,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Burn: case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: + case InstallerTypeEnum::AdvancedInstaller: context << Workflow::ShellExecuteUninstallImpl << ReportUninstallerResult("UninstallString", APPINSTALLER_CLI_ERROR_EXEC_UNINSTALL_COMMAND_FAILED); diff --git a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp index 16e759441c..0f90c24406 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp @@ -24,6 +24,7 @@ namespace AppInstaller::Manifest case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Exe: case InstallerTypeEnum::Burn: + case InstallerTypeEnum::AdvancedInstaller: return CompatibilitySet::Exe; case InstallerTypeEnum::Wix: case InstallerTypeEnum::Msi: @@ -162,6 +163,10 @@ namespace AppInstaller::Manifest { result = InstallerTypeEnum::Portable; } + else if (inStrLower == "advancedinstaller") + { + result = InstallerTypeEnum::AdvancedInstaller; + } return result; } @@ -583,6 +588,8 @@ namespace AppInstaller::Manifest return "msstore"sv; case InstallerTypeEnum::Portable: return "portable"sv; + case InstallerTypeEnum::AdvancedInstaller: + return "advancedinstaller"sv; } return "unknown"sv; @@ -888,7 +895,8 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Nullsoft || installerType == InstallerTypeEnum::Wix || installerType == InstallerTypeEnum::Burn || - installerType == InstallerTypeEnum::Portable + installerType == InstallerTypeEnum::Portable || + installerType == InstallerTypeEnum::AdvancedInstaller ); } @@ -901,7 +909,8 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Nullsoft || installerType == InstallerTypeEnum::Wix || installerType == InstallerTypeEnum::Burn || - installerType == InstallerTypeEnum::Portable + installerType == InstallerTypeEnum::Portable || + installerType == InstallerTypeEnum::AdvancedInstaller ); } @@ -913,7 +922,8 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Msi || installerType == InstallerTypeEnum::Nullsoft || installerType == InstallerTypeEnum::Wix || - installerType == InstallerTypeEnum::Burn + installerType == InstallerTypeEnum::Burn || + installerType == InstallerTypeEnum::AdvancedInstaller ); } @@ -939,7 +949,8 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Burn || installerType == InstallerTypeEnum::Inno || installerType == InstallerTypeEnum::Nullsoft || - installerType == InstallerTypeEnum::Exe; + installerType == InstallerTypeEnum::Exe || + installerType == InstallerTypeEnum::AdvancedInstaller; } bool IsArchiveType(InstallerTypeEnum installerType) @@ -962,7 +973,8 @@ namespace AppInstaller::Manifest nestedInstallerType == InstallerTypeEnum::Wix || nestedInstallerType == InstallerTypeEnum::Burn || nestedInstallerType == InstallerTypeEnum::Portable || - nestedInstallerType == InstallerTypeEnum::Msix + nestedInstallerType == InstallerTypeEnum::Msix || + nestedInstallerType == InstallerTypeEnum::AdvancedInstaller ); } @@ -1021,6 +1033,14 @@ namespace AppInstaller::Manifest {InstallerSwitchType::Log, ManifestInstaller::string_t("/LOG=\"" + std::string(ARG_TOKEN_LOGPATH) + "\"")}, {InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("/DIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} }; + case InstallerTypeEnum::AdvancedInstaller: + return + { + {InstallerSwitchType::Silent, ManifestInstaller::string_t("/exenoui /quiet /norestart")}, + {InstallerSwitchType::SilentWithProgress, ManifestInstaller::string_t("/exenoui /passive /norestart")}, + {InstallerSwitchType::Log, ManifestInstaller::string_t("/l*v \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")}, + {InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("TARGETDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} + }; default: return {}; } @@ -1054,6 +1074,7 @@ namespace AppInstaller::Manifest case InstallerTypeEnum::Burn: case InstallerTypeEnum::Wix: case InstallerTypeEnum::Msi: + case InstallerTypeEnum::AdvancedInstaller: // See https://docs.microsoft.com/windows/win32/msi/error-codes return { diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h index dc6b83bc2b..09b9d0ce13 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h @@ -100,6 +100,7 @@ namespace AppInstaller::Manifest Burn, MSStore, Portable, + AdvancedInstaller, }; enum class UpdateBehaviorEnum From 3b9dcdccffb848c5cd678b20203a1f72dc88326e Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Wed, 11 Dec 2024 17:30:48 +0200 Subject: [PATCH 03/10] fix install location cmd --- src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp index 0f90c24406..b3ef8cb170 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp @@ -165,7 +165,7 @@ namespace AppInstaller::Manifest } else if (inStrLower == "advancedinstaller") { - result = InstallerTypeEnum::AdvancedInstaller; + result = InstallerTypeEnum::AdvancedInstaller; } return result; @@ -1039,7 +1039,7 @@ namespace AppInstaller::Manifest {InstallerSwitchType::Silent, ManifestInstaller::string_t("/exenoui /quiet /norestart")}, {InstallerSwitchType::SilentWithProgress, ManifestInstaller::string_t("/exenoui /passive /norestart")}, {InstallerSwitchType::Log, ManifestInstaller::string_t("/l*v \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")}, - {InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("TARGETDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} + {InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("APPDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} }; default: return {}; From 99b7dfafb3550281abba296fdea6986002a068e0 Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Thu, 12 Dec 2024 11:46:06 +0200 Subject: [PATCH 04/10] add advinst type in manifest deserializer --- .../Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp b/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp index 7b0184210d..81a7dc30ed 100644 --- a/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp +++ b/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp @@ -531,6 +531,10 @@ namespace AppInstaller::Repository::Rest::Schema::V1_0::Json { return InstallerTypeEnum::Burn; } + else if (inStrLower == "advancedinstaller") + { + return InstallerTypeEnum::AdvancedInstaller; + } return InstallerTypeEnum::Unknown; } From 67e87d9bfebca89bb0f7d0d0dc347d163d1cd8c9 Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Thu, 12 Dec 2024 13:59:39 +0200 Subject: [PATCH 05/10] add advinst to idl --- src/Microsoft.Management.Deployment/Converters.cpp | 4 ++++ src/Microsoft.Management.Deployment/PackageManager.idl | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/Microsoft.Management.Deployment/Converters.cpp b/src/Microsoft.Management.Deployment/Converters.cpp index 08338dd306..ed8b7fc8b2 100644 --- a/src/Microsoft.Management.Deployment/Converters.cpp +++ b/src/Microsoft.Management.Deployment/Converters.cpp @@ -285,6 +285,8 @@ namespace winrt::Microsoft::Management::Deployment::implementation return Microsoft::Management::Deployment::PackageInstallerType::Wix; case ::AppInstaller::Manifest::InstallerTypeEnum::Zip: return Microsoft::Management::Deployment::PackageInstallerType::Zip; + case ::AppInstaller::Manifest::InstallerTypeEnum::AdvancedInstaller: + return Microsoft::Management::Deployment::PackageInstallerType::AdvancedInstaller; case ::AppInstaller::Manifest::InstallerTypeEnum::Unknown: return Microsoft::Management::Deployment::PackageInstallerType::Unknown; } @@ -316,6 +318,8 @@ namespace winrt::Microsoft::Management::Deployment::implementation return ::AppInstaller::Manifest::InstallerTypeEnum::Wix; case Microsoft::Management::Deployment::PackageInstallerType::Zip: return ::AppInstaller::Manifest::InstallerTypeEnum::Zip; + case Microsoft::Management::Deployment::PackageInstallerType::AdvancedInstaller: + return ::AppInstaller::Manifest::InstallerTypeEnum::AdvancedInstaller; case Microsoft::Management::Deployment::PackageInstallerType::Unknown: return ::AppInstaller::Manifest::InstallerTypeEnum::Unknown; } diff --git a/src/Microsoft.Management.Deployment/PackageManager.idl b/src/Microsoft.Management.Deployment/PackageManager.idl index 943177fc45..b807241cfa 100644 --- a/src/Microsoft.Management.Deployment/PackageManager.idl +++ b/src/Microsoft.Management.Deployment/PackageManager.idl @@ -467,6 +467,8 @@ namespace Microsoft.Management.Deployment MSStore, /// Portable type. Portable, + /// AdvancedInstaller type. + AdvancedInstaller }; /// The package installer scope. From e66581bfb77618765fd0e7783987f0eb32796965 Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Thu, 19 Dec 2024 11:38:02 +0200 Subject: [PATCH 06/10] add advinstExe switches --- .../v1.10.0/manifest.installer.1.10.0.json | 4 ++-- .../v1.10.0/manifest.singleton.1.10.0.json | 4 ++-- .../Workflows/DownloadFlow.cpp | 2 +- .../Workflows/InstallFlow.cpp | 4 ++-- .../Workflows/RepairFlow.cpp | 4 ++-- .../Workflows/UninstallFlow.cpp | 4 ++-- .../Manifest/ManifestCommon.cpp | 24 +++++++++---------- .../Public/winget/ManifestCommon.h | 2 +- .../1_0/Json/ManifestDeserializer_1_0.cpp | 4 ++-- .../Converters.cpp | 8 +++---- .../PackageManager.idl | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json index 7dd80b9cb0..5c0ec2c5d0 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json @@ -66,7 +66,7 @@ "burn", "pwa", "portable", - "advancedInstaller" + "advinstExe" ], "description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level" }, @@ -82,7 +82,7 @@ "wix", "burn", "portable", - "advancedInstaller" + "advinstExe" ], "description": "Enumeration of supported nested installer types contained inside an archive file" }, diff --git a/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json index 8d7ce92e1e..8b1947af89 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json @@ -168,7 +168,7 @@ "burn", "pwa", "portable", - "advancedInstaller" + "advinstExe" ], "description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level" }, @@ -184,7 +184,7 @@ "wix", "burn", "portable", - "advancedInstaller" + "advinstExe" ], "description": "Enumeration of supported nested installer types contained inside an archive file" }, diff --git a/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp b/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp index 2faf1c151e..c8ede97107 100644 --- a/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp @@ -48,7 +48,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Portable: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: return L".exe"sv; case InstallerTypeEnum::Msi: case InstallerTypeEnum::Wix: diff --git a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp index 64014ef70c..e8a720ca14 100644 --- a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp @@ -52,7 +52,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Msi: case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Wix: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: return true; default: return false; @@ -407,7 +407,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Msi: case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Wix: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: if (doUninstallPrevious) { context << diff --git a/src/AppInstallerCLICore/Workflows/RepairFlow.cpp b/src/AppInstallerCLICore/Workflows/RepairFlow.cpp index 3e3e056943..81a984fd2d 100644 --- a/src/AppInstallerCLICore/Workflows/RepairFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/RepairFlow.cpp @@ -337,7 +337,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Burn: case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: { context << RunRepairForRepairBehaviorBasedInstaller; @@ -380,7 +380,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Exe: case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: { context << GenerateRepairString; diff --git a/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp b/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp index 5c41be931f..0fb010f686 100644 --- a/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp @@ -220,7 +220,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Burn: case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: { IPackageVersion::Metadata packageMetadata = installedPackageVersion->GetMetadata(); @@ -330,7 +330,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Burn: case InstallerTypeEnum::Inno: case InstallerTypeEnum::Nullsoft: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: context << Workflow::ShellExecuteUninstallImpl << ReportUninstallerResult("UninstallString", APPINSTALLER_CLI_ERROR_EXEC_UNINSTALL_COMMAND_FAILED); diff --git a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp index b3ef8cb170..1928825861 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp @@ -24,7 +24,7 @@ namespace AppInstaller::Manifest case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Exe: case InstallerTypeEnum::Burn: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: return CompatibilitySet::Exe; case InstallerTypeEnum::Wix: case InstallerTypeEnum::Msi: @@ -163,9 +163,9 @@ namespace AppInstaller::Manifest { result = InstallerTypeEnum::Portable; } - else if (inStrLower == "advancedinstaller") + else if (inStrLower == "advinstexe") { - result = InstallerTypeEnum::AdvancedInstaller; + result = InstallerTypeEnum::AdvinstExe; } return result; @@ -588,8 +588,8 @@ namespace AppInstaller::Manifest return "msstore"sv; case InstallerTypeEnum::Portable: return "portable"sv; - case InstallerTypeEnum::AdvancedInstaller: - return "advancedinstaller"sv; + case InstallerTypeEnum::AdvinstExe: + return "advinstexe"sv; } return "unknown"sv; @@ -896,7 +896,7 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Wix || installerType == InstallerTypeEnum::Burn || installerType == InstallerTypeEnum::Portable || - installerType == InstallerTypeEnum::AdvancedInstaller + installerType == InstallerTypeEnum::AdvinstExe ); } @@ -910,7 +910,7 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Wix || installerType == InstallerTypeEnum::Burn || installerType == InstallerTypeEnum::Portable || - installerType == InstallerTypeEnum::AdvancedInstaller + installerType == InstallerTypeEnum::AdvinstExe ); } @@ -923,7 +923,7 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Nullsoft || installerType == InstallerTypeEnum::Wix || installerType == InstallerTypeEnum::Burn || - installerType == InstallerTypeEnum::AdvancedInstaller + installerType == InstallerTypeEnum::AdvinstExe ); } @@ -950,7 +950,7 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Inno || installerType == InstallerTypeEnum::Nullsoft || installerType == InstallerTypeEnum::Exe || - installerType == InstallerTypeEnum::AdvancedInstaller; + installerType == InstallerTypeEnum::AdvinstExe; } bool IsArchiveType(InstallerTypeEnum installerType) @@ -974,7 +974,7 @@ namespace AppInstaller::Manifest nestedInstallerType == InstallerTypeEnum::Burn || nestedInstallerType == InstallerTypeEnum::Portable || nestedInstallerType == InstallerTypeEnum::Msix || - nestedInstallerType == InstallerTypeEnum::AdvancedInstaller + nestedInstallerType == InstallerTypeEnum::AdvinstExe ); } @@ -1033,7 +1033,7 @@ namespace AppInstaller::Manifest {InstallerSwitchType::Log, ManifestInstaller::string_t("/LOG=\"" + std::string(ARG_TOKEN_LOGPATH) + "\"")}, {InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("/DIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} }; - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: return { {InstallerSwitchType::Silent, ManifestInstaller::string_t("/exenoui /quiet /norestart")}, @@ -1074,7 +1074,7 @@ namespace AppInstaller::Manifest case InstallerTypeEnum::Burn: case InstallerTypeEnum::Wix: case InstallerTypeEnum::Msi: - case InstallerTypeEnum::AdvancedInstaller: + case InstallerTypeEnum::AdvinstExe: // See https://docs.microsoft.com/windows/win32/msi/error-codes return { diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h index 09b9d0ce13..41fb0013d3 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h @@ -100,7 +100,7 @@ namespace AppInstaller::Manifest Burn, MSStore, Portable, - AdvancedInstaller, + AdvinstExe, }; enum class UpdateBehaviorEnum diff --git a/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp b/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp index 81a7dc30ed..6ef21e0374 100644 --- a/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp +++ b/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp @@ -531,9 +531,9 @@ namespace AppInstaller::Repository::Rest::Schema::V1_0::Json { return InstallerTypeEnum::Burn; } - else if (inStrLower == "advancedinstaller") + else if (inStrLower == "advinstexe") { - return InstallerTypeEnum::AdvancedInstaller; + return InstallerTypeEnum::AdvinstExe; } return InstallerTypeEnum::Unknown; diff --git a/src/Microsoft.Management.Deployment/Converters.cpp b/src/Microsoft.Management.Deployment/Converters.cpp index ed8b7fc8b2..6ce24133ac 100644 --- a/src/Microsoft.Management.Deployment/Converters.cpp +++ b/src/Microsoft.Management.Deployment/Converters.cpp @@ -285,8 +285,8 @@ namespace winrt::Microsoft::Management::Deployment::implementation return Microsoft::Management::Deployment::PackageInstallerType::Wix; case ::AppInstaller::Manifest::InstallerTypeEnum::Zip: return Microsoft::Management::Deployment::PackageInstallerType::Zip; - case ::AppInstaller::Manifest::InstallerTypeEnum::AdvancedInstaller: - return Microsoft::Management::Deployment::PackageInstallerType::AdvancedInstaller; + case ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstExe: + return Microsoft::Management::Deployment::PackageInstallerType::AdvinstExe; case ::AppInstaller::Manifest::InstallerTypeEnum::Unknown: return Microsoft::Management::Deployment::PackageInstallerType::Unknown; } @@ -318,8 +318,8 @@ namespace winrt::Microsoft::Management::Deployment::implementation return ::AppInstaller::Manifest::InstallerTypeEnum::Wix; case Microsoft::Management::Deployment::PackageInstallerType::Zip: return ::AppInstaller::Manifest::InstallerTypeEnum::Zip; - case Microsoft::Management::Deployment::PackageInstallerType::AdvancedInstaller: - return ::AppInstaller::Manifest::InstallerTypeEnum::AdvancedInstaller; + case Microsoft::Management::Deployment::PackageInstallerType::AdvinstExe: + return ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstExe; case Microsoft::Management::Deployment::PackageInstallerType::Unknown: return ::AppInstaller::Manifest::InstallerTypeEnum::Unknown; } diff --git a/src/Microsoft.Management.Deployment/PackageManager.idl b/src/Microsoft.Management.Deployment/PackageManager.idl index b807241cfa..1cbde5809e 100644 --- a/src/Microsoft.Management.Deployment/PackageManager.idl +++ b/src/Microsoft.Management.Deployment/PackageManager.idl @@ -467,8 +467,8 @@ namespace Microsoft.Management.Deployment MSStore, /// Portable type. Portable, - /// AdvancedInstaller type. - AdvancedInstaller + /// AdvancedInstaller exe type. + AdvinstExe, }; /// The package installer scope. From 0cfc90f4cd912a44610abf5298debeaadb158ce1 Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Thu, 19 Dec 2024 14:56:28 +0200 Subject: [PATCH 07/10] add advinstMsi installer type --- .../v1.10.0/manifest.installer.1.10.0.json | 6 ++-- .../v1.10.0/manifest.singleton.1.10.0.json | 6 ++-- .../Workflows/DownloadFlow.cpp | 3 ++ .../Workflows/InstallFlow.cpp | 3 ++ .../Workflows/RepairFlow.cpp | 2 ++ .../Workflows/UninstallFlow.cpp | 2 ++ .../Manifest/ManifestCommon.cpp | 28 ++++++++++++++++--- .../Public/winget/ManifestCommon.h | 1 + .../1_0/Json/ManifestDeserializer_1_0.cpp | 4 +++ .../Converters.cpp | 6 +++- .../PackageManager.idl | 2 ++ 11 files changed, 54 insertions(+), 9 deletions(-) diff --git a/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json index 5c0ec2c5d0..f8dccbfeab 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json @@ -66,7 +66,8 @@ "burn", "pwa", "portable", - "advinstExe" + "advinstExe", + "advinstMsi" ], "description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level" }, @@ -82,7 +83,8 @@ "wix", "burn", "portable", - "advinstExe" + "advinstExe", + "advinstMsi" ], "description": "Enumeration of supported nested installer types contained inside an archive file" }, diff --git a/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json index 8b1947af89..a7ab1a177e 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json @@ -168,7 +168,8 @@ "burn", "pwa", "portable", - "advinstExe" + "advinstExe", + "advinstMsi" ], "description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level" }, @@ -184,7 +185,8 @@ "wix", "burn", "portable", - "advinstExe" + "advinstExe", + "advinstMsi" ], "description": "Enumeration of supported nested installer types contained inside an archive file" }, diff --git a/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp b/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp index c8ede97107..18664e8eac 100644 --- a/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp @@ -52,6 +52,7 @@ namespace AppInstaller::CLI::Workflow return L".exe"sv; case InstallerTypeEnum::Msi: case InstallerTypeEnum::Wix: + case InstallerTypeEnum::AdvinstMsi: return L".msi"sv; case InstallerTypeEnum::Msix: // Note: We may need to distinguish between .msix and .msixbundle in the future. @@ -224,6 +225,8 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Portable: case InstallerTypeEnum::Wix: case InstallerTypeEnum::Zip: + case InstallerTypeEnum::AdvinstExe: + case InstallerTypeEnum::AdvinstMsi: context << DownloadInstallerFile; break; case InstallerTypeEnum::Msix: diff --git a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp index e8a720ca14..2f33f516cb 100644 --- a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp @@ -53,6 +53,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Wix: case InstallerTypeEnum::AdvinstExe: + case InstallerTypeEnum::AdvinstMsi: return true; default: return false; @@ -65,6 +66,7 @@ namespace AppInstaller::CLI::Workflow { case InstallerTypeEnum::Msi: case InstallerTypeEnum::Wix: + case InstallerTypeEnum::AdvinstMsi: return isSilentInstall || ExperimentalFeature::IsEnabled(ExperimentalFeature::Feature::DirectMSI); default: return false; @@ -408,6 +410,7 @@ namespace AppInstaller::CLI::Workflow case InstallerTypeEnum::Nullsoft: case InstallerTypeEnum::Wix: case InstallerTypeEnum::AdvinstExe: + case InstallerTypeEnum::AdvinstMsi: if (doUninstallPrevious) { context << diff --git a/src/AppInstallerCLICore/Workflows/RepairFlow.cpp b/src/AppInstallerCLICore/Workflows/RepairFlow.cpp index 81a984fd2d..8ee05dbc14 100644 --- a/src/AppInstallerCLICore/Workflows/RepairFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/RepairFlow.cpp @@ -345,6 +345,7 @@ namespace AppInstaller::CLI::Workflow break; case InstallerTypeEnum::Msi: case InstallerTypeEnum::Wix: + case InstallerTypeEnum::AdvinstMsi: { context << RepairMsiBasedInstaller; @@ -389,6 +390,7 @@ namespace AppInstaller::CLI::Workflow // MSI based installers, for installed package all gets mapped to msi extension. case InstallerTypeEnum::Msi: case InstallerTypeEnum::Wix: + case InstallerTypeEnum::AdvinstMsi: { context << SetProductCodesInContext; diff --git a/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp b/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp index 0fb010f686..061d52a99c 100644 --- a/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/UninstallFlow.cpp @@ -246,6 +246,7 @@ namespace AppInstaller::CLI::Workflow } case InstallerTypeEnum::Msi: case InstallerTypeEnum::Wix: + case InstallerTypeEnum::AdvinstMsi: { // Uninstall strings for MSI don't include UI level (/q) needed to avoid interactivity, // so we handle them differently. @@ -337,6 +338,7 @@ namespace AppInstaller::CLI::Workflow break; case InstallerTypeEnum::Msi: case InstallerTypeEnum::Wix: + case InstallerTypeEnum::AdvinstMsi: context << Workflow::ShellExecuteMsiExecUninstall << ReportUninstallerResult("MsiExec", APPINSTALLER_CLI_ERROR_EXEC_UNINSTALL_COMMAND_FAILED); diff --git a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp index 1928825861..af84fff530 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp @@ -28,6 +28,7 @@ namespace AppInstaller::Manifest return CompatibilitySet::Exe; case InstallerTypeEnum::Wix: case InstallerTypeEnum::Msi: + case InstallerTypeEnum::AdvinstMsi: return CompatibilitySet::Msi; case InstallerTypeEnum::Msix: case InstallerTypeEnum::MSStore: @@ -167,6 +168,10 @@ namespace AppInstaller::Manifest { result = InstallerTypeEnum::AdvinstExe; } + else if (inStrLower == "advinstmsi") + { + result = InstallerTypeEnum::AdvinstMsi; + } return result; } @@ -590,6 +595,8 @@ namespace AppInstaller::Manifest return "portable"sv; case InstallerTypeEnum::AdvinstExe: return "advinstexe"sv; + case InstallerTypeEnum::AdvinstMsi: + return "advinstmsi"sv; } return "unknown"sv; @@ -896,7 +903,8 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Wix || installerType == InstallerTypeEnum::Burn || installerType == InstallerTypeEnum::Portable || - installerType == InstallerTypeEnum::AdvinstExe + installerType == InstallerTypeEnum::AdvinstExe || + installerType == InstallerTypeEnum::AdvinstMsi ); } @@ -910,7 +918,8 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Wix || installerType == InstallerTypeEnum::Burn || installerType == InstallerTypeEnum::Portable || - installerType == InstallerTypeEnum::AdvinstExe + installerType == InstallerTypeEnum::AdvinstExe || + installerType == InstallerTypeEnum::AdvinstMsi ); } @@ -923,7 +932,8 @@ namespace AppInstaller::Manifest installerType == InstallerTypeEnum::Nullsoft || installerType == InstallerTypeEnum::Wix || installerType == InstallerTypeEnum::Burn || - installerType == InstallerTypeEnum::AdvinstExe + installerType == InstallerTypeEnum::AdvinstExe || + installerType == InstallerTypeEnum::AdvinstMsi ); } @@ -974,7 +984,8 @@ namespace AppInstaller::Manifest nestedInstallerType == InstallerTypeEnum::Burn || nestedInstallerType == InstallerTypeEnum::Portable || nestedInstallerType == InstallerTypeEnum::Msix || - nestedInstallerType == InstallerTypeEnum::AdvinstExe + nestedInstallerType == InstallerTypeEnum::AdvinstExe || + nestedInstallerType == InstallerTypeEnum::AdvinstMsi ); } @@ -1041,6 +1052,14 @@ namespace AppInstaller::Manifest {InstallerSwitchType::Log, ManifestInstaller::string_t("/l*v \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")}, {InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("APPDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} }; + case InstallerTypeEnum::AdvinstMsi: + return + { + {InstallerSwitchType::Silent, ManifestInstaller::string_t("/quiet /norestart")}, + {InstallerSwitchType::SilentWithProgress, ManifestInstaller::string_t("/passive /norestart")}, + {InstallerSwitchType::Log, ManifestInstaller::string_t("/log \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")}, + {InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("APPDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} + }; default: return {}; } @@ -1075,6 +1094,7 @@ namespace AppInstaller::Manifest case InstallerTypeEnum::Wix: case InstallerTypeEnum::Msi: case InstallerTypeEnum::AdvinstExe: + case InstallerTypeEnum::AdvinstMsi: // See https://docs.microsoft.com/windows/win32/msi/error-codes return { diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h index 41fb0013d3..d4af2c1344 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h @@ -101,6 +101,7 @@ namespace AppInstaller::Manifest MSStore, Portable, AdvinstExe, + AdvinstMsi }; enum class UpdateBehaviorEnum diff --git a/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp b/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp index 6ef21e0374..8549de7281 100644 --- a/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp +++ b/src/AppInstallerRepositoryCore/Rest/Schema/1_0/Json/ManifestDeserializer_1_0.cpp @@ -535,6 +535,10 @@ namespace AppInstaller::Repository::Rest::Schema::V1_0::Json { return InstallerTypeEnum::AdvinstExe; } + else if (inStrLower == "advinstmsi") + { + return InstallerTypeEnum::AdvinstMsi; + } return InstallerTypeEnum::Unknown; } diff --git a/src/Microsoft.Management.Deployment/Converters.cpp b/src/Microsoft.Management.Deployment/Converters.cpp index 6ce24133ac..46de01ea9a 100644 --- a/src/Microsoft.Management.Deployment/Converters.cpp +++ b/src/Microsoft.Management.Deployment/Converters.cpp @@ -286,7 +286,9 @@ namespace winrt::Microsoft::Management::Deployment::implementation case ::AppInstaller::Manifest::InstallerTypeEnum::Zip: return Microsoft::Management::Deployment::PackageInstallerType::Zip; case ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstExe: - return Microsoft::Management::Deployment::PackageInstallerType::AdvinstExe; + return Microsoft::Management::Deployment::PackageInstallerType::AdvinstExe; + case ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstMsi: + return Microsoft::Management::Deployment::PackageInstallerType::AdvinstMsi; case ::AppInstaller::Manifest::InstallerTypeEnum::Unknown: return Microsoft::Management::Deployment::PackageInstallerType::Unknown; } @@ -320,6 +322,8 @@ namespace winrt::Microsoft::Management::Deployment::implementation return ::AppInstaller::Manifest::InstallerTypeEnum::Zip; case Microsoft::Management::Deployment::PackageInstallerType::AdvinstExe: return ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstExe; + case Microsoft::Management::Deployment::PackageInstallerType::AdvinstMsi: + return ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstMsi; case Microsoft::Management::Deployment::PackageInstallerType::Unknown: return ::AppInstaller::Manifest::InstallerTypeEnum::Unknown; } diff --git a/src/Microsoft.Management.Deployment/PackageManager.idl b/src/Microsoft.Management.Deployment/PackageManager.idl index 1cbde5809e..124e3e8416 100644 --- a/src/Microsoft.Management.Deployment/PackageManager.idl +++ b/src/Microsoft.Management.Deployment/PackageManager.idl @@ -469,6 +469,8 @@ namespace Microsoft.Management.Deployment Portable, /// AdvancedInstaller exe type. AdvinstExe, + /// AdvancedInstaller msi type. + AdvinstMsi, }; /// The package installer scope. From b911eeca2d3cb250582b4ae9a75c32f2d1ab4bab Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Thu, 19 Dec 2024 16:18:32 +0200 Subject: [PATCH 08/10] treat advinst exe bootstrapper return-codes in a different switch case --- .../Manifest/ManifestCommon.cpp | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp index af84fff530..cfba3c3886 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp @@ -1093,7 +1093,6 @@ namespace AppInstaller::Manifest case InstallerTypeEnum::Burn: case InstallerTypeEnum::Wix: case InstallerTypeEnum::Msi: - case InstallerTypeEnum::AdvinstExe: case InstallerTypeEnum::AdvinstMsi: // See https://docs.microsoft.com/windows/win32/msi/error-codes return @@ -1145,6 +1144,32 @@ namespace AppInstaller::Manifest { HRESULT_FROM_WIN32(ERROR_DEPLOYMENT_OPTION_NOT_SUPPORTED), ExpectedReturnCodeEnum::SystemNotSupported }, { HRESULT_FROM_WIN32(ERROR_PACKAGE_LACKS_CAPABILITY_TO_DEPLOY_ON_HOST), ExpectedReturnCodeEnum::SystemNotSupported }, }; + case InstallerTypeEnum::AdvinstExe: + // See https://www.advancedinstaller.com/user-guide/exe-setup-file.html + return + { + { ERROR_INSTALL_ALREADY_RUNNING, ExpectedReturnCodeEnum::InstallInProgress }, + { ERROR_DISK_FULL, ExpectedReturnCodeEnum::DiskFull }, + { ERROR_INSTALL_SERVICE_FAILURE, ExpectedReturnCodeEnum::ContactSupport }, + { ERROR_SUCCESS_REBOOT_REQUIRED, ExpectedReturnCodeEnum::RebootRequiredToFinish }, + { ERROR_SUCCESS_REBOOT_INITIATED, ExpectedReturnCodeEnum::RebootInitiated }, + { ERROR_INSTALL_USEREXIT, ExpectedReturnCodeEnum::CancelledByUser }, + { ERROR_PRODUCT_VERSION, ExpectedReturnCodeEnum::AlreadyInstalled }, + { ERROR_INSTALL_REJECTED, ExpectedReturnCodeEnum::SystemNotSupported }, + { ERROR_INSTALL_PACKAGE_REJECTED, ExpectedReturnCodeEnum::BlockedByPolicy }, + { ERROR_INSTALL_TRANSFORM_REJECTED, ExpectedReturnCodeEnum::BlockedByPolicy }, + { ERROR_PATCH_PACKAGE_REJECTED, ExpectedReturnCodeEnum::BlockedByPolicy }, + { ERROR_PATCH_REMOVAL_DISALLOWED, ExpectedReturnCodeEnum::BlockedByPolicy }, + { ERROR_INSTALL_REMOTE_DISALLOWED, ExpectedReturnCodeEnum::BlockedByPolicy }, + { ERROR_INVALID_PARAMETER, ExpectedReturnCodeEnum::InvalidParameter }, + { ERROR_INVALID_TABLE, ExpectedReturnCodeEnum::InvalidParameter }, + { ERROR_INVALID_COMMAND_LINE, ExpectedReturnCodeEnum::InvalidParameter }, + { ERROR_INVALID_PATCH_XML, ExpectedReturnCodeEnum::InvalidParameter }, + { ERROR_INSTALL_LANGUAGE_UNSUPPORTED, ExpectedReturnCodeEnum::SystemNotSupported }, + { ERROR_INSTALL_PLATFORM_UNSUPPORTED, ExpectedReturnCodeEnum::SystemNotSupported }, + { -1, ExpectedReturnCodeEnum::CancelledByUser } + //1, when EXE bootstrapper is launched with wrong value for /aespassword parameter + }; default: return {}; } From 7b1fbb802adecbabb15f91d3dbb4cf6327565f25 Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Fri, 20 Dec 2024 15:22:06 +0200 Subject: [PATCH 09/10] do not use verbose output log for advinstExe type --- src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp index cfba3c3886..2cc9b7adb3 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp @@ -1049,7 +1049,7 @@ namespace AppInstaller::Manifest { {InstallerSwitchType::Silent, ManifestInstaller::string_t("/exenoui /quiet /norestart")}, {InstallerSwitchType::SilentWithProgress, ManifestInstaller::string_t("/exenoui /passive /norestart")}, - {InstallerSwitchType::Log, ManifestInstaller::string_t("/l*v \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")}, + {InstallerSwitchType::Log, ManifestInstaller::string_t("/log \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")}, {InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("APPDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")} }; case InstallerTypeEnum::AdvinstMsi: From 76064cd46550cc0651244d0b31ff759971c27f6e Mon Sep 17 00:00:00 2001 From: Stefan Pirvulescu Date: Mon, 23 Dec 2024 13:56:58 +0200 Subject: [PATCH 10/10] fix check-spelling --- .github/actions/spelling/allow.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index 0776f0427d..3ddf101827 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -422,3 +422,10 @@ Xlang XResource XTOKEN xunit +advancedinstaller +advinst +advinstexe +advinstmsi +aespassword +APPDIR +exenoui