Detect the DirectX's version installed: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(Replacing page with 'WTF?') |
(Undo revision 16717 by 92.18.65.84 (Talk)) |
||
Line 1: | Line 1: | ||
{{PageAuthor|Joel}} | |||
== Description == | |||
This will detect the current installed version of the DirectX. | |||
Hope that will work with v7 and lower. | |||
Bugs? PM | |||
== The Script == | |||
<highlight-nsis> | |||
OutFile "DirectX.exe" | |||
Name "Detect DirectX version" | |||
Caption "Detect DirectX version" | |||
XPStyle "on" | |||
Function .onInit | |||
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\DirectX" "Version" | |||
StrCpy $1 $0 4 3 | |||
MessageBox MB_OK $1 | |||
Quit | |||
FunctionEnd | |||
Section "-boo" | |||
; | |||
SectionEnd | |||
</highlight-nsis> | |||
Thanks KichiK for the "StrCpy" idea :p | |||
[[Category:Other Products Version Detection Functions]] |
Revision as of 10:59, 5 February 2009
Author: Joel (talk, contrib) |
Description
This will detect the current installed version of the DirectX. Hope that will work with v7 and lower. Bugs? PM
The Script
OutFile "DirectX.exe" Name "Detect DirectX version" Caption "Detect DirectX version" XPStyle "on" Function .onInit ReadRegStr $0 HKLM "SOFTWARE\Microsoft\DirectX" "Version" StrCpy $1 $0 4 3 MessageBox MB_OK $1 Quit FunctionEnd Section "-boo" ; SectionEnd
Thanks KichiK for the "StrCpy" idea :p