Autoit高手来。. 5
这个段代码是用来远程重启的可是一直报错,可以确定的是代码结构肯定没问题,谁能帮我修复Dim$computer="pc"Dim$Remoteuser="admin"Dim$...
这个段代码是用来远程重启的
可是一直报错,可以确定的是代码结构肯定没问题,谁能帮我修复
Dim $computer ="pc"
Dim $Remoteuser ="admin"
Dim $Remotepass = "sanhen"
$objlocator= ObjCreate ("wbemscripting.swbemlocator")
$objWMIService=$objlocator.connectserver($computer,"root/cimv2",$Remoteuser,$Remotepass)
$colItems = $objWMIService.ExecQuery("SELECT * FROM win32_operatingsystem where primary= true")
For $objItem in $colItems
$objItem.win32shutdown(6)
Next 展开
可是一直报错,可以确定的是代码结构肯定没问题,谁能帮我修复
Dim $computer ="pc"
Dim $Remoteuser ="admin"
Dim $Remotepass = "sanhen"
$objlocator= ObjCreate ("wbemscripting.swbemlocator")
$objWMIService=$objlocator.connectserver($computer,"root/cimv2",$Remoteuser,$Remotepass)
$colItems = $objWMIService.ExecQuery("SELECT * FROM win32_operatingsystem where primary= true")
For $objItem in $colItems
$objItem.win32shutdown(6)
Next 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询