!include "StrFunc.nsh" ${Using:StrFunc} StrRep !include LogicLib.nsh OutFile "NSIStest.exe" ShowInstDetails SHOW Section nsExec::ExecToStack '"wmic.exe" PATH Win32_videocontroller get currentrefreshrate /all' Pop $0 Pop $1 ${StrRep} $1 $1 "currentrefreshrate" "" loop: StrCpy $2 $1 1 ${If} $2 == "$\r" ${OrIf} $2 == "$\n" ${OrIf} $2 == " " StrCpy $1 $1 "" 1 Goto loop ${EndIf} IntOp $2 $1 + 0 ${If} $0 = 0 DetailPrint WMIC=$2Hz ${EndIf} SectionEnd