本帖最后由 fybhwsx 于 2016-9-1 08:18 编辑
如果没有激活,就运行激活工具。。运行激活工具没有问题,但怎么加上是否激活的判断呢?求助大侠!;检测激活Windows
Run(@ComSpec & ' /c ' & 'slmgr.vbs -dlv', '', @SW_HIDE);检测当前操作系统激活状态
WinWait("Windows Script Host", "", 10)
Local $sText = WinGetText("Windows Script Host")
If StringInStr($sText, "找不到产品密钥") Or StringInStr($sText, "未激活") Then
;MsgBox($MB_SYSTEMMODAL, "", $sText)
ControlFocus("Windows Script Host", "", "Button1")
ControlClick("Windows Script Host", "", "Button1")
ShellExecuteWait("AutoPico.exe", "", "D:\win10激活工具\KMSpico Portable", "open", @SW_SHOWNORMAL);运行系统激活程序
Else
ControlFocus("Windows Script Host", "", "Button1")
ControlClick("Windows Script Host", "", "Button1")
EndIf
|