ENVI^  EnviMode=1
WinDiskList
_SUB WinDiskList,W600H200,늚턍죗깊

    FDRV &Drvs=*:
    FORX * %&Drvs%,&D,
    {*
    PART list drv %&D%,&&V
    MSTR &&hd=<9>%&V%
    ^SET &Drv[%&hd%]=%%&Drv[%&hd%]%%%&D%
    }


    PART list disk,&&홍꼬늚턍
    ENVI &&늚턍LIST=
    SET &D1=
    forx * %&홍꼬늚턍%,&늚턍,
    {*
    PART -devidx list disk %&늚턍%,&&iDskInf
    MSTR &&hd,&&SZ,&&Bus,&&DskID=<1><2><9><~12>%&iDskInf%
    FIND $%&DskID%=,
    {*  TEAM PART -devid list disk %&늚턍%,&&iDskInf|MSTR &&DskID=<~12>%&iDskInf%
    SED &DskID=1,USBSTOR\\DISK\&VEN_,,%&DskID%
    SED &DskID=1,\&REV.*,,%&DskID%
    SED &DskID=1,\&,_,%&DskID%
    }
    FIND $%&DskID%=, SET DskID=-
    IFEX #%Bus%=2, SET Bus=(ATAPI)
    IFEX #%Bus%=3, SET Bus=(ATA)
    IFEX #%Bus%=7, SET Bus=(USB)
    IFEX #%&SZ%>2G, @TEAM CALC &SZ=%&SZ%/1G#3| SET SZ=%&SZ%G! IFEX #%&SZ%>2M, @TEAM CALC &SZ=%&SZ%/1M#1| SET SZ=%&SZ%M
    ^SET &늚턍LIST=%&늚턍LIST%|%&늚턍% %&Bus% %&SZ% %&DskID% %%&Drv[%hd%]%%
    FIND $%&D1%=, ^SET &D1=%&늚턍% %&Bus% %&SZ% %&DskID% %%&Drv[%hd%]%%
    }
    LIST   PHYDRV,L20T20W528H232,%&늚턍LIST%,,%&D1%
_END
