0

Is it possible to disable & enable a USB connected digital picture frame in a windows batch file? I am currently using the DEVCON Enabhle/disable command & that does make the unit not shown as a drive & shows USB disabled in the Device Manager but the actual frame still thinks its connected. It is not until the frame is turned off/on or the USB cable is removed that it act like its not connected.

Here is my current program.

devcon enable *DEV_24CD
devcon enable *DEV_24C2
devcon enable *DEV_24C4
copy C:\Pic_Frame\Br_Frame\*.* E:\ /y
copy C:\Pic_Frame\Blk_Frame\*.* I:\ /y
del C:\Pic_Frame\Br_Frame\*.* /q
del C:\Pic_Frame\Blk_Frame\*.* /q
devcon disable *DEV_24CD
devcon disable *DEV_24C2
devcon disable *DEV_24C4

I understand this maybe an issue with the frame, but hoped there was something on the PC I was missing.

Thanks in advance.

Andy

4

1 回答 1

0

如果您需要 USB 设备知道它已断开连接,您应该让它在总线上重新枚举,这将模拟拔出和插入 USB,或者可能在您的情况下进行开/关切换。

而不是从系统中完全禁用和删除设备的devcon disable问题。devcon remove然后使用devcon rescan它来重新枚举。根据您要执行的操作,您可能需要结合使用这些和原始enable/disable命令。

于 2014-01-13T15:04:30.357 回答