+target=$SNF_IMAGE_TARGET
+mkdir -p "$target/Windows/Setup/Scripts"
+
+cat "@commondir@/unattend.xml" > "$target/Unattend.xml"
+echo "del /Q /F C:\Unattend.xml" > \
+ "$target/Windows/Setup/Scripts/SetupComplete.cmd"
+
+mkdir -p "$target/Windows/SnfScripts"
+
+echo "exit" > "$target/Windows/SnfScripts/ExtendFilesystem"
+echo "del /Q /F C:\Windows\SnfScripts\ExtendFilesystem" >> \
+ "$target/Windows/Setup/Scripts/SetupComplete.cmd"
+
+echo "@echo off" > "$target/Windows/SnfScripts/ChangeAdminPassword.cmd"
+# For security reasons, overwrite the file before deleting...
+spaces=$(printf "%200s");
+echo "echo ${spaces// /X} > C:\Windows\SnfScripts\ChangeAdminPassword.cmd" >> \
+ "$target/Windows/Setup/Scripts/SetupComplete.cmd"
+echo "del /Q /F C:\Windows\SnfScripts\ChangeAdminPassword.cmd" >> \
+ "$target/Windows/Setup/Scripts/SetupComplete.cmd"
+
+echo "rmdir C:\Windows\SnfScripts" >> \
+ "$target/Windows/Setup/Scripts/SetupComplete.cmd"
+