1

Closed

Gather information on attached USB devices

description

Copy USB log files and related registry keys.
 
Version is required for this modification as the file system paths for the setupapi.log file are different for XP vs Vista or Win7.
 
(This modification currently depends on the alternate version detection code I listed in the version detection issue tracker thread, but can easily be modified if another method is used.)
 
ECHO.
ECHO ***************************************************************************
ECHO Gathering information about USB devices
ECHO ***************************************************************************
ECHO.
now.exe [Gathering information about USB devices.] >> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
 
ECHO Copying setupapi Logs.
now.exe [Copying setupapi logs.] >> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
 
if %OSNAME% == XP Goto XP_USB_Setup_API
if %OSNAME% == Vista Goto Vista_USB_Setup_API
 
:XP_USB_Setup_API
copy /v /d C:\Windows\setupapi.* %LOGS%:\Livecap_%COMPUTERNAME%\
Goto USB_Setup_API_Done
 
:Vista_USB_Setup_API
copy /v /d C:\Windows\inf\setupapi.* %LOGS%:\Livecap_%COMPUTERNAME%\
Goto USB_Setup_API_Done
 
:USB_Setup_API_Done
 
ECHO Exporting USB Registry keys.
now.exe [Exporting USB Registry keys.] >> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
reg export hklm\system\currentcontrolset\enum\usbstor %LOGS%:\Livecap_%COMPUTERNAME%\usbstor.reg
reg export hklm\system\currentcontrolset\enum\usb %LOGS%:\Livecap_%COMPUTERNAME%\usb.reg
Closed Mar 22, 2012 at 6:14 AM by RussMcRee
Update included in 2.0 stable release.

comments