ENVI^ EnviMode=1
IFEX X.LOG, LOGS * X.LOG
ENVI  &&MySys=__VirSys_SYSTEM
ENVI &&VN=0x4   //禁止
ENVI &&VA=0x2   //自动

ENVI &&Old=%&VA%
ENVI &&New=%&VN%

//[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\kxescore]
//#2=自动
//#4=禁用
//"Start"=dword:00000004

ENVI &&WDIR=%&CurDir%\Windows
ENVI &FN=%&CurDir%\Windows\System32\config\system
FDRV &&CurDrv=%&CurDir%
IFEX %&CurDrv%\WINNT\System32\config\system,    ENVI &FN=%&CurDrv%\WINNT\System32\config\system
IFEX %&CurDrv%\Windows\System32\config\system,  ENVI &FN=%&CurDrv%\Windows\System32\config\system
IFEX %&CurDir%\WINNT\System32\config\system,    ENVI &FN=%&CurDir%\WINNT\System32\config\system
IFEX %&CurDir%\Windows\System32\config\system,  ENVI &FN=%&CurDir%\Windows\System32\config\system
CALL FIX  

_SUB  FIX
    FDRV &WDrv=%&FN%
    //MESS  %&CurDrv%=%SystemDrive%
    FIND $%&WDrv%=%SystemDrive%,!!  TEAM MESS 系统正在运行，可能不能统运行! | ENVI &FN=| ENVI &MySys=SYSTEM|  //| EXIT

    FIND $%&FN%=,!  HIVE  %&MySys%
    FIND $%&FN%=,!  HIVE  %&MySys%,%&FN%

    ENVI I=1
    LOOP %I%<=9,
    {*
        REGI  #HKEY_LOCAL_MACHINE\%&MySys%\ControlSet00%I%\Services\kxescore\Start,&&V
        FIND $%&V%=%&Old%, REGI  #HKEY_LOCAL_MACHINE\%&MySys%\ControlSet00%I%\Services\kxescore\Start=%&New%
        CALC   #I= %I% + 1
    }

    FIND $%&FN%=,!  HIVE %&MySys%
    MESS 完毕
_END

