Skip to content

Commit

Permalink
Remove registry mount command
Browse files Browse the repository at this point in the history
This command makes troubles because MSIX Hero needs access to registry.dat for certain packages. This functionality will soon become obsolete with the introduction of a new registry browser.
  • Loading branch information
marcinotorowski committed May 9, 2021
1 parent fed9870 commit 9eb4961
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

<Label Content="Other" />

<Button
<!--<Button
Style="{StaticResource ActionButton}"
CommandParameter="{x:Static commands1:DialogTarget.Selection}"
CommandTarget="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Popup}}"
Expand All @@ -102,7 +102,7 @@
<b:Interaction.Behaviors>
<helpers:ButtonClosePopup />
</b:Interaction.Behaviors>
</Button>
</Button>-->

<Button
Style="{StaticResource ActionButton}"
Expand Down
10 changes: 4 additions & 6 deletions src/Otor.MsixHero.Appx/Psf/PsfReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ public PsfApplicationDescriptor Read(string applicationId, string originalEntryP
}
else
{
using (var memoryStream = new MemoryStream())
{
stream.CopyTo(memoryStream);
memoryStream.Flush();
reg = new RegistryHiveOnDemand(memoryStream.ToArray(), "Registry.dat");
}
using var memoryStream = new MemoryStream();
stream.CopyTo(memoryStream);
memoryStream.Flush();
reg = new RegistryHiveOnDemand(memoryStream.ToArray(), "Registry.dat");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Task MountRegistry(InstalledPackage package, bool startRegedit = false, C
var proxyObject = new MountRegistryDto
{
PackageName = package.Name,
InstallLocation = package.ManifestLocation,
InstallLocation = package.InstallLocation,
StartRegedit = startRegedit
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override Task Invoke(IProxyObject command, CancellationToken cancellation

if (command is MountRegistryDto mountRegistryDto)
{
return this.SelfElevationAwareObject.DismountRegistry(mountRegistryDto.PackageName, cancellationToken, progress);
return this.SelfElevationAwareObject.MountRegistry(mountRegistryDto.PackageName, mountRegistryDto.InstallLocation, mountRegistryDto.StartRegedit, cancellationToken, progress);
}

throw new NotSupportedException();
Expand Down

0 comments on commit 9eb4961

Please sign in to comment.