- stat_busy "Setting \"$start_script\" as the script to be executed"\
- "when Windows PE boots"
- cp "$start_script" "$mnt_dir"|| stat_fail
- cat > "$mnt_dir/Windows/System32/winpeshl.ini" << EOF
-[LaunchApps]
-%SYSTEMDRIVE%\\$start_script
-EOF
+ stat_busy "Setting \"$start_script\" as the script to be executed when Windows PE boots"
+ cp "$start_script" "$tmp_dir/$start_script"
+ cat > "$tmp_dir/__mkwinpeimg.winpeshl.ini" <<- EOF
+ [LaunchApps]
+ %SYSTEMDRIVE%\\$start_script
+ EOF
+ cat 1>&3 <<- EOF
+ add '$tmp_dir/$start_script' '/$start_script'
+ delete --force /Windows/System32/winpeshl.ini
+ add '$tmp_dir/__mkwinpeimg.winpeshl.ini' /Windows/System32/winpeshl.ini
+ EOF