Comment arrêter un vb script qui s'exécute dans windows

Je suis sous windows 7

J'ai écrit un script pour vérifier si Mon ordinateur Portable est en cours d'exécution dans la Batterie ou de l'adaptateur de courant.
Je l'ai googlé et succedded.

dim a
a=1
Do While a=1 
If IsLaptop( "." ) Then
   ' WScript.Echo "Laptop"
Else
   ' WScript.Echo "Desktop or server"
End If
Loop

Function IsLaptop( myComputer )
    On Error Resume Next    
    Set objWMIService = GetObject( "winmgmts://" & myComputer & "/root/cimv2" )
    Set colItems = objWMIService.ExecQuery( "Select * from Win32_Battery", , 48 )
    IsLaptop = False
    For Each objItem in colItems
        if objItem.BatteryStatus=2 and objItem.EstimatedChargeRemaining=98 then
             WScript.Echo "Remove Ac Adapter Immediately"
        elseif objItem.BatteryStatus=1 and objItem.EstimatedChargeRemaining=10 then
             WScript.Echo "Pluggin to charger immediately"
        end if
    Next
    If Err Then Err.Clear
    On Error Goto 0
End Function

Mais mon problème est maintenant. Ce script est jamais script comment arrêter si je veux mettre fin manuellement.

Est-il de toute façon j'y vais et je trouve ce processus et d'arrêt dans windows?

OriginalL'auteur shanmugamgsn | 2011-11-05