powershell to bat
Posted: 30 Sep 2019 17:28
Hello
someone who can convert this powershell to batch?
thanks!
do{
$p1 = [System.Windows.Forms.Cursor]::Position
Start-Sleep -Seconds 2
$p2 = [System.Windows.Forms.Cursor]::Position
if($p1.X -ne $p2.X -and $p1.Y -ne $p2.Y) {
Stop-Service -Name "wifi driver"
Start-Sleep -Seconds 60
}ELSE {
Start-Service -Name "wifi driver"
}
}until($infinity)
someone who can convert this powershell to batch?
thanks!
do{
$p1 = [System.Windows.Forms.Cursor]::Position
Start-Sleep -Seconds 2
$p2 = [System.Windows.Forms.Cursor]::Position
if($p1.X -ne $p2.X -and $p1.Y -ne $p2.Y) {
Stop-Service -Name "wifi driver"
Start-Sleep -Seconds 60
}ELSE {
Start-Service -Name "wifi driver"
}
}until($infinity)