mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Fix psd1 file resolution when installed
This commit is contained in:
@@ -5,24 +5,18 @@
|
||||
<?include $(sys.CURRENTDIR)\Common.wxi?>
|
||||
|
||||
<Fragment>
|
||||
<DirectoryRef Id="CmdNotFoundInstallFolder" FileSource="$(var.BinDir)modules\$(var.CmdNotFoundProjectName)">
|
||||
<DirectoryRef Id="INSTALLFOLDER" FileSource="$(var.BinDir)">
|
||||
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
|
||||
<Component Id="Module_CmdNotFound" Win64="yes" Guid="80F648F2-29F6-4685-AED4-04DC1B6EE176">
|
||||
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||
<RegistryValue Type="string" Name="Module_CmdNotFound" Value="" KeyPath="yes"/>
|
||||
</RegistryKey>
|
||||
<File Source="$(var.BinDir)modules\$(var.CmdNotFoundProjectName)\PowerToys.CmdNotFoundModuleInterface.dll" />
|
||||
<File Source="$(var.BinDir)modules\$(var.CmdNotFoundProjectName)\PowerToys.CommandNotFound.dll" />
|
||||
<File Source="$(var.BinDir)WinGetCommandNotFound.psd1" />
|
||||
<!-- The dllss will be picked up by BaseApplications generateAllFileComponents.ps1-->
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<ComponentGroup Id="CmdNotFoundComponentGroup">
|
||||
<Component Id="RemoveCmdNotFoundFolder" Guid="C32B0224-2965-4082-BC20-600AD93F872F" Directory="CmdNotFoundInstallFolder">
|
||||
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||
<RegistryValue Type="string" Name="RemoveCmdNotFoundFolder" Value="" KeyPath="yes"/>
|
||||
</RegistryKey>
|
||||
<RemoveFolder Id="RemoveFolderCmdNotFoundInstallFolder" Directory="CmdNotFoundInstallFolder" On="uninstall"/>
|
||||
</Component>
|
||||
<ComponentRef Id="Module_CmdNotFound" />
|
||||
</ComponentGroup>
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<ComponentGroupRef Id="VideoConferenceComponentGroup" />
|
||||
<ComponentGroupRef Id="MouseWithoutBordersComponentGroup" />
|
||||
<ComponentGroupRef Id="EnvironmentVariablesComponentGroup" />
|
||||
<ComponentGroupRef Id="CmdNotFoundComponentGroup" />
|
||||
|
||||
<ComponentGroupRef Id="ResourcesComponentGroup" />
|
||||
<ComponentGroupRef Id="WindowsAppSDKComponentGroup" />
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user