Identify CD drive and eject using bat or vbs while in WinPE without external files
问题 I need to identify the CD drive and eject the tray. This is executed while booted in WinPE, so the WMP eject function is not available. This script will be used on various computer models/configurations. I'm currently using this: For Each d in CreateObject("Scripting.FileSystemObject").Drives CreateObject("Shell.Application").Namespace(17).ParseName("D:\").InvokeVerb("Eject") Next It works, but sometimes it errors and requires user interaction before it ejects. I suspect that it's because of