diff --git a/src/AppInstallerCLICore/Commands/RootCommand.cpp b/src/AppInstallerCLICore/Commands/RootCommand.cpp index a385fbcd4b..8a8c51cb16 100644 --- a/src/AppInstallerCLICore/Commands/RootCommand.cpp +++ b/src/AppInstallerCLICore/Commands/RootCommand.cpp @@ -135,11 +135,8 @@ namespace AppInstaller::CLI keyDirectories.OutputLine({ Resource::LocString{ Resource::String::PortableLinksUser }, Runtime::GetPathTo(Runtime::PathName::PortableLinksUserLocation, true).u8string() }); keyDirectories.OutputLine({ Resource::LocString{ Resource::String::PortableLinksMachine }, Runtime::GetPathTo(Runtime::PathName::PortableLinksMachineLocation, true).u8string() }); keyDirectories.OutputLine({ Resource::LocString{ Resource::String::PortableRootUser }, Runtime::GetPathTo(Runtime::PathName::PortablePackageUserRoot, true).u8string() }); + keyDirectories.OutputLine({ Resource::LocString{ Resource::String::PortableRoot }, Runtime::GetPathTo(Runtime::PathName::PortablePackageMachineRoot, true).u8string() }); keyDirectories.OutputLine({ Resource::LocString{ Resource::String::PortableRoot86 }, Runtime::GetPathTo(Runtime::PathName::PortablePackageMachineRootX86, true).u8string() }); - if (Utility::GetSystemArchitecture() == Utility::Architecture::X64 || Utility::GetSystemArchitecture() == Utility::Architecture::Arm64) - { - keyDirectories.OutputLine({ Resource::LocString{ Resource::String::PortableRoot64 }, Runtime::GetPathTo(Runtime::PathName::PortablePackageMachineRootX64, true).u8string() }); - } keyDirectories.Complete(); context.Reporter.Info() << std::endl; } diff --git a/src/AppInstallerCLICore/PortableInstaller.cpp b/src/AppInstallerCLICore/PortableInstaller.cpp index b5d8cd4df9..19d7a0a396 100644 --- a/src/AppInstallerCLICore/PortableInstaller.cpp +++ b/src/AppInstallerCLICore/PortableInstaller.cpp @@ -44,7 +44,7 @@ namespace AppInstaller::CLI::Portable } else { - return Runtime::GetPathTo(Runtime::PathName::PortablePackageMachineRootX64); + return Runtime::GetPathTo(Runtime::PathName::PortablePackageMachineRoot); } } else diff --git a/src/AppInstallerCLICore/Resources.h b/src/AppInstallerCLICore/Resources.h index 945d573406..536dd0bd37 100644 --- a/src/AppInstallerCLICore/Resources.h +++ b/src/AppInstallerCLICore/Resources.h @@ -317,7 +317,7 @@ namespace AppInstaller::CLI::Resource WINGET_DEFINE_RESOURCE_STRINGID(PortableLinksUser); WINGET_DEFINE_RESOURCE_STRINGID(PortablePackageAlreadyExists); WINGET_DEFINE_RESOURCE_STRINGID(PortableRegistryCollisionOverridden); - WINGET_DEFINE_RESOURCE_STRINGID(PortableRoot64); + WINGET_DEFINE_RESOURCE_STRINGID(PortableRoot); WINGET_DEFINE_RESOURCE_STRINGID(PortableRoot86); WINGET_DEFINE_RESOURCE_STRINGID(PortableRootUser); WINGET_DEFINE_RESOURCE_STRINGID(PositionArgumentDescription); diff --git a/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw b/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw index e17431b031..e567fa12a4 100644 --- a/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw +++ b/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw @@ -1415,11 +1415,11 @@ Please specify one of them using the --source option to proceed. Portable Package Root (User) - - Portable Package Root (x86) + + Portable Package Root - Portable Package Root (x64) + Portable Package Root (x86) Portable install failed; Cleaning up... diff --git a/src/AppInstallerCommonCore/Public/AppInstallerRuntime.h b/src/AppInstallerCommonCore/Public/AppInstallerRuntime.h index 0031b4febf..b7b2d8d10e 100644 --- a/src/AppInstallerCommonCore/Public/AppInstallerRuntime.h +++ b/src/AppInstallerCommonCore/Public/AppInstallerRuntime.h @@ -52,8 +52,8 @@ namespace AppInstaller::Runtime UserProfile, // The location where portable packages are installed to with user scope. PortablePackageUserRoot, - // The location where portable packages are installed to with machine scope (x64). - PortablePackageMachineRootX64, + // The location where portable packages are installed to with machine scope. + PortablePackageMachineRoot, // The location where portable packages are installed to with machine scope (x86). PortablePackageMachineRootX86, // The location where symlinks to portable packages are stored under user scope. diff --git a/src/AppInstallerCommonCore/Runtime.cpp b/src/AppInstallerCommonCore/Runtime.cpp index 55a5d9b905..e1ec80974e 100644 --- a/src/AppInstallerCommonCore/Runtime.cpp +++ b/src/AppInstallerCommonCore/Runtime.cpp @@ -448,11 +448,11 @@ namespace AppInstaller::Runtime result.Path /= s_PortablePackagesDirectory; } break; - case PathName::PortablePackageMachineRootX64: + case PathName::PortablePackageMachineRoot: result.Path = Settings::User().Get(); if (result.Path.empty()) { - result.Path = GetKnownFolderPath(FOLDERID_ProgramFilesX64); + result.Path = GetKnownFolderPath(FOLDERID_ProgramFiles); result.Path /= s_PortablePackageRoot; result.Path /= s_PortablePackagesDirectory; } @@ -534,7 +534,7 @@ namespace AppInstaller::Runtime } break; case PathName::UserProfile: - case PathName::PortablePackageMachineRootX64: + case PathName::PortablePackageMachineRoot: case PathName::PortablePackageMachineRootX86: case PathName::PortableLinksMachineLocation: result = GetPathDetailsCommon(path); @@ -618,13 +618,19 @@ namespace AppInstaller::Runtime } break; case PathName::UserProfile: - case PathName::PortablePackageUserRoot: - case PathName::PortablePackageMachineRootX64: + case PathName::PortablePackageMachineRoot: case PathName::PortablePackageMachineRootX86: - case PathName::PortableLinksUserLocation: case PathName::PortableLinksMachineLocation: result = GetPathDetailsCommon(path); break; + case PathName::PortableLinksUserLocation: + case PathName::PortablePackageUserRoot: + result = GetPathDetailsCommon(path); + if (forDisplay) + { + ReplaceCommonPathPrefix(result.Path, GetKnownFolderPath(FOLDERID_LocalAppData), "%LOCALAPPDATA%"); + } + break; case PathName::SelfPackageRoot: result.Path = GetBinaryDirectoryPath(); result.Create = false;