替换 16 位安装程序,程序需要短文件名吗?

发布于 2024-09-27 19:52:07 字数 687 浏览 2 评论 0原文

我有一个旧游戏(Westwood Monopoly CD-ROM),它只有 16 位安装程序,因此无法在我的 Windows 7 x64 上运行。为了解决这个问题,我决定使用 Inno Setup 来制作一个新的安装程序。游戏本身是 32 位的,但不支持 LFN,并且可以在 Vista/7 上运行,但是如果我使用 Inno Setup 构建的安装程序未在检查 Windows 95 兼容性的情况下运行,游戏将会崩溃。

启用兼容模式生成的文件夹与未检查兼容性设置生成的文件夹之间没有文件或属性差异。但是,游戏只能在以兼容模式安装的文件夹中运行,游戏exe(Monopoly.exe)本身不能启用任何兼容模式选项,否则每当您尝试保存、加载或选择计算机AI之一时游戏就会终止播放器文件。如果在未为安装程序设置兼容模式的情况下创建的文件夹中的 Monopoly.exe 打开了 95 的兼容模式,则游戏将加载,但由于上述原因将无法玩。

我的猜测是,Windows 95 设置强制创建短文件名,而如果没有它,游戏将无法找到它的文件,因为不存在短文件名信息。为安装程序设置兼容模式并不是理想的解决方案,因为我需要能够根据检测到的 Windows 版本复制不同的 exe(Aero 会导致部分屏幕被截断,因此我使用十六进制编辑的 exe 和更大的默认尺寸)。

所以我的问题是:有没有办法强制 Inno setup 在复制时创建短文件名信息,或者有没有办法在完成后用命令添加它(即修复损坏的文件夹,以便游戏可以找到它的文件)?

I have an old game (Westwood Monopoly CD-ROM) that only has a 16-bit installer so it won't run on my Windows 7 x64. To get around this I decided to use Inno Setup to make a new installer. The game itself is 32-bit but not LFN aware and will run on Vista/7, however the game will crash if the installer I built with Inno Setup is not run with Windows 95 compatibility checked.

There are no file or attribute differences between the folder generated by having compatibility mode on and the folder generated with no compatibility settings checked. However, the game will only run in the folder installed with compatibility mode, the game exe (Monopoly.exe) itself cannot have any compatibility mode option enabled or the game terminates whenever you try to save, load, or choose one of the computer ai player files. If compatibility mode for 95 is turned on for Monopoly.exe in the folder created without compatibility mode set for the installer, the game will load but will be unplayable for the above reasons.

My guess is that the Windows 95 setting forces short filenames to be created, while without it the game cannot find it's files because the short filename information isn't there. Having compatibility mode set for the installer is not the ideal solution since I need to be able to copy a different exe based on the version of Windows detected (Aero causes part of the screen to be cut off so I use a hex edited exe with a bigger default size).

So my question is this: Is there a way to force Inno setup to create the short filename information as it copies, or is there a way to add that with a command after it is finished (ie. repair the broken folder so the game can find its files)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

Oo萌小芽oO 2024-10-04 19:52:07

据我所知,问题在于较新版本的 Windows Installer 和 Windows 本身不再支持使用短名称。该属性已逐步停止使用,并且从(AFIK)Vista 开始,它完全没有被使用。如果您尝试包含它们,大多数现代安装程序技术都会给您带来错误。您是否尝试过查看DosBox?这也可能允许您无需特殊的安装程序即可运行它。

As far as I am aware, the problem is that the newer version of Windows Installer and Windows itself no longer support the use of short names. That property has been phased out of use and as of (AFIK) Vista it is flat out not used. Most modern installer technologies will give you an error if you try to include them. Have you tried looking at DosBox? That might also allow you to run it without the need for a special installer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文