根据Windows版本在Inno Setup Run部分中执行不同的命令 [英] Execute different command in Inno Setup Run section based on Windows version
本文介绍了根据Windows版本在Inno Setup Run部分中执行不同的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要知道Windows是XP,7、8、2003、2008还是2012,因为取决于版本,我将运行特定的命令.
I need to know if the Windows is XP, 7, 8, 2003, 2008 or 2012, because depends on version I will run a specific command.
我试图在Windows 2008中安装IIS,但没有成功.我在Windows 2012上尝试过,但工作正常.
I tried to install IIS in Windows 2008, but it did not work. I tried in Windows 2012 and it worked normally.
Filename: pkgmgr; Parameters: "/iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-BasicAuthentication;IIS-ManagementService;IIS-CGI;IIS-RequestFiltering;IIS-Performance;IIS-ManagementConsole;IIS-WindowsAuthentication;IIS-WebServer;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;IIS-ASPNET;NetFx4Extended-ASPNET45;IIS-ASPNET45;IIS-NetFxExtensibility45;NetFx4Extended-ASPNET45"; Flags: 64bit; Check: IsWin64
我必须在Windows 2008中手动运行它:
I had to run this manually in Windows 2008:
start /w pkgmgr /l:log.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-ManagementService;IIS-CGI;IIS-RequestFiltering;IIS-ASPNET;IIS-HttpLogging;IIS-NetFxExtensibility;IIS-HttpErrors;IIS-DefaultDocument;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-StaticContent;IIS-ManagementConsole;IIS-DirectoryBrowsing;IIS-WindowsAuthentication;IIS-WebServer;
推荐答案
使用 < [Run]
部分中的c0>和OnlyBelowVersion
参数 >:
Use the MinVersion
and OnlyBelowVersion
parameters in the [Run]
section:
[Run]
; for Windows 2012 and newer:
Filename: pkgmgr; Parameters: "/iu:..."; MinVersion: 6.2
; for older versions (Windows 2008)
Filename: pkgmgr; Parameters: "/iu:..."; OnlyBelowVersion: 6.2
了解 Windows版本号.
这篇关于根据Windows版本在Inno Setup Run部分中执行不同的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文