制作通用系统镜像 批处理删除所有设备驱动

通常制作一个可以在不同配置电脑上使用的Ghost系统需要使用系统封装软件,该类软件的核心是删除所有设备驱动,

这里自己编写命令行程序删除所有驱动替代系统封装软件

    @echo off
    :: CPU
    devcon remove ACPI"Processor
    ::GAME Port
    devcon remove PCI"CC_09*
    ::网卡
    devcon remove PCI"CC_02*
    ::声卡
    devcon remove PCI"CC_04*
    :: USB HOST and SMBus
    devcon remove PCI"CC_0C*
    :: 监视器
    devcon remove DISPLAY"*
    :: 显卡
    devcon remove PCI"CC_03*
    :: 芯片组
    devcon remove PCI"CC_0604*
    :: 磁盘卷
    devcon remove @STORAGE"*
    :: USB存储卷
    devcon remove @USBSTOR"*
    :: USB设备
    devcon remove @USB"*
    :: 人机接口设备
    devcon remove @HID"*
    :: IDE设备
    devcon remove @ide"*
    :: IDE Channel
    devcon remove @PCIIDE"*

命令行调用了 devcon.exe 程序,该程序包含在Windows 驱动程序工具包 (WDK)中,

适用于 Windows 10 版本 2004 的 WDK,完整的包超过500MB,
这里我单独提取了devcon.exe 10.0版程序,包含32位和64位两个版本,大小只有46KB,下载地址

注意需在安全模式下运行,否则一些驱动无法删除

posted @ 2020-06-06 13:27  X2009  阅读(1121)  评论(0编辑  收藏  举报