Skip to content

Instantly share code, notes, and snippets.

@sverrirs
Created December 12, 2015 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sverrirs/15e9e24946f5992cf4de to your computer and use it in GitHub Desktop.
Save sverrirs/15e9e24946f5992cf4de to your computer and use it in GitHub Desktop.
; Set working dir to the driver dir (otherwise the uninstall of any loaded devices wont work)
Push $OUTDIR
SetOutPath "$INSTDIR\driver"
; Execute the device uninstall and inf deletion script
ExecWait '"$INSTDIR\driver\uninstall_device.bat"' $0
DetailPrint "Return code was $0"
; Restore the working directory
Pop $OUTDIR
SetOutPath $OUTDIR # Optional if working directory does not matter for the rest of the code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment