简体   繁体   English

NSIS:以兼容模式运行安装子文件

[英]NSIS: Run sub-file of Installation in compatibility mode

I am using NSIS to create an application installer which consists of multiple programm installation files, mainly .exe and .msi files.我正在使用 NSIS 创建一个应用程序安装程序,其中包含多个程序安装文件,主要是 .exe 和 .msi 文件。

Now I have the problem that I have a very old setup file which only works properly if I set the compatibility to Windows ME/98.现在我的问题是我有一个非常旧的安装文件,只有在我将兼容性设置为 Windows ME/98 时才能正常工作。 Usually the Users which will run the installation don't have the ability to run the whole installation package in compatibility mode.通常,将运行安装的用户无法在兼容模式下运行整个安装包。

Is there a command in NSIS to execute such a sub-setup in a specific compatibility mode? NSIS 中是否有命令可以在特定的兼容模式下执行这样的子设置?

You can set __COMPAT_LAYER to Win98:您可以将__COMPAT_LAYER设置为 Win98:

System::Call 'Kernel32::SetEnvironmentVariable(t "__COMPAT_LAYER", t "Win98")'
ExecWait '"$instdir\foo.exe"'
System::Call 'Kernel32::SetEnvironmentVariable(t "__COMPAT_LAYER", i 0)'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM