This VBScript code creates a Windows Media Player object and checks if one or more CD-ROM drives are available, then ejects any discs in the drives. It gets the CD-ROM collection from the Windows Media Player object, checks the count, then uses a For/Next loop to iterate through each drive and eject the disc.
This VBScript code creates a Windows Media Player object and checks if one or more CD-ROM drives are available, then ejects any discs in the drives. It gets the CD-ROM collection from the Windows Media Player object, checks the count, then uses a For/Next loop to iterate through each drive and eject the disc.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online from Scribd
This VBScript code creates a Windows Media Player object and checks if one or more CD-ROM drives are available, then ejects any discs in the drives. It gets the CD-ROM collection from the Windows Media Player object, checks the count, then uses a For/Next loop to iterate through each drive and eject the disc.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online from Scribd
do Set oWMP = CreateObject("WMPlayer.OCX.7") Set colCDROM = oWMP.cdromCollection if colCDROMs.Count >= 1 then For i = 0 to colCDROMs.Count - 1 colCDROMs.Item(i).