new file mode 100755
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+# extract-vsssdk-headers
+# Author: Paolo Bonzini <pbonzini@redhat.com>
+
+set -e
+if test $# = 0 || ! test -f "$1"; then
+ echo 'Usage: extract-vsssdk-headers /path/to/setup.exe'
+ exit 1
+fi
+
+# Extract .MSI file in the .exe, looking for the OLE compound
+# document signature. Extra data at the end does not matter.
+export LC_ALL=C
+MAGIC=$'\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1'
+offset=`grep -abom1 "$MAGIC" "$1" | sed -n 's/:/\n/; P' `
+(dd of=/dev/null skip=$offset bs=1 count=0; cat) < "$1" > vsssdk.msi
+
+# Now extract the files.
+tmpdir=tmp$$
+mkdir $tmpdir
+msiextract -C $tmpdir vsssdk.msi
+mv "$tmpdir/Program Files/Microsoft/VSSSDK72/inc" inc
+rm -rf $tmpdir vsssdk.msi
+exit 0