Skip to content

Instantly share code, notes, and snippets.

@changbowen
Created August 20, 2019 03:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save changbowen/275544f601fe001daab4758dadae0129 to your computer and use it in GitHub Desktop.
Save changbowen/275544f601fe001daab4758dadae0129 to your computer and use it in GitHub Desktop.
remove devices leftover from a dameware uninstall
################################
# Script created by Carl Chang #
################################
$devcon = 'path\to\devcon_x64.exe'
# uninstall dameware products
wmic product where "name like '%%dameware%%'" call uninstall
# remove left-over devices
.$devcon remove DAMEWARE_MIRROR_DEVICE DWD_SMARTCARD *DW0000
# remove driver packages
.$devcon dp_enum | Select-String dameware -Context 1,0 | foreach {
.$devcon dp_delete $_.Context.PreContext -f
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment