Check IIS Version Before Installing: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Reverted edits by 222.65.202.53 to last version by ConversionBot)
Line 9: Line 9:
</highlight-nsis>
</highlight-nsis>


[[http://www.shrentcar.com 租车]]
== The Function ==
[[http://www.shrentcar.com 汽车租�]] [[http://www.rentcarcompany.com 租车]][[http://www.shrentbus.cn 租车]]
<highlight-nsis>
[[http://rentcar.host2.9466.net/ 汽车租�]][[http://rentcar.host2.9466.net/ 租车]][[http://www.shrentbus.cn 上海租车]]
;--------------------------------
[[http://www.11rentcar.com/ 汽车租�]][[http://www.11rentcar.com/ 租车]]
; CheckIISVersion Function
;
; This is built off MSFT's required keys for IIS
; (info at ttp://tinyurl.com/thon)
; and the NSIS archive (http://tinyurl.com/thom)
Function CheckIISVersion


[[http://www.dela88.com/ 防�电]] [[http://www.haungsanok.com/ 防�电]] [[http://www.tripto.com/ 三亚]]
ClearErrors
[[http://www.tripto.com/ 三亚旅游]][[http://www.postdream.org 公�注册]][[http://www.dreamhk.org 注册香港公�]]
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\InetStp" "MajorVersion"
[[http://www.postdream.org 注册公�]][[http://www.regsh.com/ 注册公�]][[http://www.regsh.com/ 公�注册]]
ReadRegDWORD $1 HKLM "SOFTWARE\Microsoft\InetStp" "MinorVersion"
[[http://www.dreamatsh.com 公�注册]][[http://www.dreamatsh.com 注册公�]]


[[http://www.dreamathk.com 注册香港公�]]
IfErrors 0 NoAbort
[[http://www.companyforyou.com/ 注册公�]][[http://www.companyforyou.com/ 上海注册公�]]
Abort "Setup could not detect Microsoft Internet Information Server v5 or later; this is required for installation. Setup will abort."
[[http://www.hkcompanyforyou.cn 注册香港公�]][[http://companyok.68l.net/ 公�注册]]
[[http://companyok.68l.net/ 注册公�]][[http://okcomapany.68l.com/ 注册海外公�]]
[[http://okcomapany.68l.com/ 注册美国公�]][[http://www.11company.com/ 注册香港公�]]
[[http://www.11company.com/ 香港公�]][[http://www.companyforhk.cn/ 注册香港公�]]
[[http://www.companyforhk.cn/ 香港公�]] [[http://www.shregister.com/ 注册公�]]
[[http://www.shregister.com/ 公�注册]] [[http://www.mesoresources.com/blog/dzyblog/ 租车]]
[[http://www.for-sme.com 注册商标]][[http://www.for-vip.com 公�注册]]
[[http://www.for-sme.com 商标注册]][[http://www.for-vip.com 注册香港公�]]


[[http://www.mesoresources.com/blog/dzyblog/ 汽车租�]]
IntCmp $0 5 NoAbort IISMajVerLT5 NoAbort
[[http://nowbot.com/blog/dzybog/ 上海租车]]
[[http://www.hplc.cn/ 租车]]
[[http://www.hplc.cn/ 汽车租�]]
[[http://www.companyforhk.cn/ 注册香港公�]]
[[http://www.companyforhk.cn/ 香港公�]]
[[http://www.for-vip.net 注册商标]]
[[http://www.for-vip.net 注册英国公�]]
[[http://www.for-vip.net 注册美国公�]]


[[http://www.shticketcenter.com 机票]]
NoAbort:
[[http://www.cnticket.net 机票]]
DetailPrint "Found Microsoft Internet Information Server v$0.$1"
[[http://www.ticketsh.net 机票]]
Goto ExitFunction
[[http://www.55377.com 香港六�彩]]
 
[[http://www.55377.com 六�彩]]
IISMajVerLT5:
[[http://www.52lac.net 六�彩]]
Abort "Setup could not detect Microsoft Internet Information Server v5 or later; this is required for installation. Setup will abort."
[[http://www.88299.net 六�彩]]
 
[[http://www.88t99.com �费电影]]
ExitFunction:
[[http://www.88t99.com 电影下载]]
 
FunctionEnd
</highlight-nsis>
 
[[Category:Other Products Version Detection Functions]]

Revision as of 19:33, 26 July 2005

Author: icebrrrg (talk, contrib)


Description

Here's a quick function that will check the registry to see (1) if IIS is installed, and (2) the version is at least v5.0. You can manipulate it to check for other versions. I call this in a section which installs the web virtual directory, so we only check for IIS if that module is selected by the user.

Function Call

	Call CheckIISVersion

The Function

;--------------------------------
; CheckIISVersion Function
;
; This is built off MSFT's required keys for IIS
; (info at ttp://tinyurl.com/thon)
; and the NSIS archive (http://tinyurl.com/thom)
Function CheckIISVersion
 
	ClearErrors
	ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\InetStp" "MajorVersion"
	ReadRegDWORD $1 HKLM "SOFTWARE\Microsoft\InetStp" "MinorVersion"
 
	IfErrors 0 NoAbort
	Abort "Setup could not detect Microsoft Internet Information Server v5 or later; this is required for installation. Setup will abort."
 
	IntCmp $0 5 NoAbort IISMajVerLT5 NoAbort
 
	NoAbort:
		DetailPrint "Found Microsoft Internet Information Server v$0.$1"
		Goto ExitFunction
 
	IISMajVerLT5:
		Abort "Setup could not detect Microsoft Internet Information Server v5 or later; this is required for installation. Setup will abort."
 
	ExitFunction:
 
FunctionEnd