截图来自 [ 聖なるかな Special Edition ]
前言
本文原文来自终点论坛,原作者为Kanade,原帖链接已丢失。由[ 白鳥紗葉 ]进行整理。
终点论坛自2023年12月被关停之后,虽然复活为了drdian全年龄论坛,但是之前的许多帖子不见了。本文原文就来自终点论坛教程区的一篇帖子,内容来自这篇文章的镜像存档。由于文章图片只有缩略图,页面颜色和字体太阴间,且原作者最后给出的注册表修正脚本疑似如今已经无法使用,于是决定对这篇帖子进行整理,修正一些内容,并以一款生肉镜像做示例来演示。
御爱同盟有一篇帖子标题为 日本生肉游戏注册表问题解决经验 ,但是御爱同盟最近关站中,等到日后开放再阅读那篇帖子对本文做补充。
以下为正文
标题起的有点混乱,意思就是有些游戏直接安装完毕后复制安装文件夹到其他位置是无法运行的,这类游戏并不是完全绿色化。
在这里谈一点自己的看法吧,游戏也是计算机程序的一种,看到硬盘版不要以为高大上,其实就是那些游戏在制作的时候没有强烈依靠注册表信息就可以运行,这样的才可以制作硬盘版,才能绿色化运行,说是绿色化其实也不准确,真正的绿色化应该是完全不写多余数据,不写入注册表。那么有些程序由于有保护措施,必须要挂在镜像才能玩。有一些必须要安装才能玩,而有的游戏,必须要修正注册表信息才能做成硬盘版记得当初遇到的第一个需要修正注册表信息的游戏是 横恋母 ,发布者没有考虑到这款游戏需要修正注册表才能运行直接就打包了,但是我好奇的是,下面的评论里面提到无法运行的人寥寥无几,我就奇了怪了,你们是怎么玩的???
接下来是正片了,这个教程只有那些制作硬盘版的人才需要看看,伸手党自行无视本教程。
正文
主要步骤:
- 修正注册表必须要知道程序写入了什么信息,因此需要使用工具监控游戏安装过程
- 得到了注册表信息和键值后,需要将其导出,然后使用批处理文件进行修正
PS:其实导出注册表信息之后,可以手动修改路径来导入注册表,但游戏位置移动后再次导入,需删除原先的注册表再导入新的,因此制作批处理文件更方便地进行修正
其实就是上面的两步。以RPG游戏 聖なるかな Special Edition 为例子讲解一下吧。
获取注册表信息和键值
一. 监控工具很多,个人用的是 Total Uninstall 6 ,其他类似工具都可以使用,以下是通用步骤,无法进行安装时查看备注信息。
TU程序下载地址,区分32位和64位。https://pan.baidu.com/s/1pLwD6Kb 同时提供 备用地址 访问密码:ysq7x 解压密码:月谣
建议在日文系统下进行。简体中文系统 部分游戏无法成功安装
如确实需要在简体中文系统下安装,请使用LE转区软件安装完毕后,使用 Total Uninstall 6 的程序分析功能获取注册表相关信息。
1.将窗口切换到<ruby>已监控程序<rt>Monitored programs</rt></ruby>,把游戏setup.exe安装程序直接拖放到窗口上,开始安装过程。
2.选择创建<ruby>新的系统快照<rt>Create a new system snapshot</rt></ruby>(务必选择此项)
3.耐心等待快照建立
4.<ruby>启动安装程序<rt>Launch setup program</rt></ruby>。
强烈建议使用日文系统或者采取备注方法获取注册表信息。
5.安装完毕后查看注册修改
6.导出注册表
PS. 以上是标准流程,建议在日文系统下进行。简体中文系统 部分游戏无法成功安装
如确实需要在简体中文系统下安装,请使用LE转区软件安装完毕后,使用 Total Uninstall 6 的程序分析功能获取注册表相关信息。
分析完毕后,如下图,在右侧显示分析结果
选择最有可能的注册表项目,右键,<ruby>打开<rt>Open</rt></ruby>
二、得到注册表信息后写批处理语句。批处理的好处是可以自适应路径的变化。而注册表文件的路径是写死的,当然也可以自己修改reg文件的路径。
打开导出的 reg 文件,是以下内容
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\XUSE_CORP]
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\XUSE_CORP\NarukanaXF0223]
"HD"="C:\\Program Files (x86)\\Xuse\\聖なるかな Special Edition\\HD\\"
"CD"="C:\\Program Files (x86)\\Xuse\\聖なるかな Special Edition\\CD\\"
"PatchVersion"=dword:0001000b
"install"="C:\\Program Files (x86)\\Xuse\\聖なるかな Special Edition\\"
修正用的bat文件内容见下方,仅供参考
@echo off
REM Check if running as administrator
net session >nul 2>&1
if %errorLevel% == 0 (
title 聖なるかな Special Edition By Moonpsalms-org
echo 聖なるかな Special Edition 注册表修复程序 By Moonpsalms-org
echo Running with administrative privileges...
echo=
echo=
echo 首次打开游戏前或移动游戏到别的文件夹,需要运行此脚本。
echo 按任意键开始修复……
pause >nul
cd /d "%~dp0"
if exist NarukanaXF0223.exe goto UpdateRegistry
echo 请将此程序放置于NarukanaXF0223.exe同一目录下再运行,按任意键退出...
goto end
) else (
echo 请以管理员身份运行,按任意键退出...
pause >nul
exit
)
:UpdateRegistry
SET CurrentDir=%CD%
SET CurrentDir=%CurrentDir:\=\\%
REM 删除旧的注册表项
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\XUSE_CORP\NarukanaXF0223" /f
REM 创建新的注册表文件
> ".\Update.reg" ECHO Windows Registry Editor Version 5.00
>>".\Update.reg" ECHO.
>>".\Update.reg" ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\XUSE_CORP]
>>".\Update.reg" ECHO.
>>".\Update.reg" ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\XUSE_CORP\NarukanaXF0223]
>>".\Update.reg" ECHO "HD"="%CurrentDir%\\HD\\"
>>".\Update.reg" ECHO "CD"="%CurrentDir%\\CD\\"
>>".\Update.reg" ECHO "PatchVersion"=dword:00010006
>>".\Update.reg" ECHO "install"="%CurrentDir%\\"
cls
REM 导入新的注册表文件
regedit /s ".\Update.reg"
"%windir%\regedit.exe" /s ".\Update.reg"
"%windir%\SysWoW64\regedit.exe" /s ".\Update.reg"
REM 删除临时注册表文件
del /F /Q ".\Update.reg"
echo 修复完成,按任意键退出
:end
pause >nul
exit
请根据获取到的注册表文件自行研究如何编写bat文件,多使用搜索引擎获取信息,自行查资料或询问各家大模型学习
以下是原评论区的回帖,此处做引用。
syl:
感谢dalao,我还有两个问题想问:
1.怎么选择最有可能的注册表项目?
- 想提取硬盘版究竟应该怎么改注册表才能让别人能用。。。是不是不同的游戏要写不同的注册表?
Kanade RE syl:
注册表位置其实是靠猜的,注册表对于一般用户来说绝对是禁区,之前我就因为乱改注册表导致系统崩溃了。
还是需要多查查资料才能找对,
不同游戏注册表路径肯定是不一样的,如果是一样的那还了得,相互覆盖会出大问题的。
每一款游戏路径都是不一样的。
https://bbs.zdfx.net/thread-97754-1-1.html (已失效)
里面有我写的横恋母的批处理