获取屏幕刷新率

!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
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容