OffineRegistry 1.0.4

dotnet add package OffineRegistry --version 1.0.4                
NuGet\Install-Package OffineRegistry -Version 1.0.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OffineRegistry" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OffineRegistry --version 1.0.4                
#r "nuget: OffineRegistry, 1.0.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OffineRegistry as a Cake Addin
#addin nuget:?package=OffineRegistry&version=1.0.4

// Install OffineRegistry as a Cake Tool
#tool nuget:?package=OffineRegistry&version=1.0.4                

OffineRegistry


这个库修改自offreg

这个库在新版本中追随原生体验, 因此重写了相关方法;

//1.0.4版本增加了InitOffreg, 你必须先调用他加载offreg.dll, 然后才可以调用加载hive

例如: RegistryKey.InitOffreg.InitLibrary(@"X:\Windows\System32\offreg.dll");

//如果你不想判断subkey是否存在, 请直接createsubkey, 因为创建前会先尝试打开

//1.0.4支持多路径了:

例如: key2.CreateSubKey(@"xxx\sssssss\ssssssfsf\sdfsdfwefs\sadfsdfsdfsef");


使用方法与offreg一样, 值得注意的是, SaveHive方法中的版本非常依赖offreg.dll的版本:

e.g. offreg version = 6.2 (win7)

此时调用 savehive(10, 0); 将会抛出异常(因为这是win10的版本号), 正确做法是执行前复制一份目标操作注册表单元'System32\offreg.dll', 这样可以确保顺利保存

(x-已经重写save方法)[另外保存hive不能存在已有文件,原地保存可以先删除(打开时全部载入内存, 不占用文件)后保存同名文件即可] 新版本会自动删除, 如果保存失败直接退出将永久丢失文件, 请确认保存成功再退出, 因为hive数据库是全部载入内存, 只要内存还在就可以保存到别的地方

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 354 1/12/2023
1.0.3 294 1/9/2023
1.0.2 301 1/7/2023
1.0.1 306 1/7/2023
1.0.0 288 1/7/2023