From 881364fa0aee3d3b3c8a4c5eef76e704ae5988fa Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Fri, 22 Dec 2023 23:36:43 +0000 Subject: [PATCH] Fix psd1 file resolution when installed --- installer/PowerToysSetup/CmdNotFound.wxs | 12 +++--------- installer/PowerToysSetup/Product.wxs | 1 + .../Assets/Settings/Scripts/EnableModule.ps1 | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/installer/PowerToysSetup/CmdNotFound.wxs b/installer/PowerToysSetup/CmdNotFound.wxs index b2a362ec7d..3429df960c 100644 --- a/installer/PowerToysSetup/CmdNotFound.wxs +++ b/installer/PowerToysSetup/CmdNotFound.wxs @@ -5,24 +5,18 @@ - + - - + + - - - - - - diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index d88a6ff5a8..ee15ec090a 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -72,6 +72,7 @@ + diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Scripts/EnableModule.ps1 b/src/settings-ui/Settings.UI/Assets/Settings/Scripts/EnableModule.ps1 index 85227c87c8..844613a2be 100644 --- a/src/settings-ui/Settings.UI/Assets/Settings/Scripts/EnableModule.ps1 +++ b/src/settings-ui/Settings.UI/Assets/Settings/Scripts/EnableModule.ps1 @@ -32,7 +32,7 @@ if ((-not [string]::IsNullOrEmpty($profileContent)) -and ($profileContent.Contai else { Add-Content -Path $PROFILE -Value "`r`n#34de4b3d-13a8-4540-b76d-b9e8d3851756 PowerToys CommandNotFound module" - Add-Content -Path $PROFILE -Value "`r`nImport-Module $scriptPath\WinGetCommandNotFound.psd1" + Add-Content -Path $PROFILE -Value "`r`nImport-Module `"$scriptPath\WinGetCommandNotFound.psd1`"" Add-Content -Path $PROFILE -Value "#34de4b3d-13a8-4540-b76d-b9e8d3851756" Write-Host "Module was successfully registered in the profile file." }