SFX script problem..
Posted: 11 Aug 2012 18:20
I have the below script that creates the diskpart .txt file and .bat to create a Bootable USB thumbdrive and works great,
but when I create a sfx winrar .exe file its not creating the the script.txt or bat file.
I am open to suggestions.. thanks, DosProbie
but when I create a sfx winrar .exe file its not creating the the script.txt or bat file.
I am open to suggestions.. thanks, DosProbie
Code: Select all
@echo off&color a
setlocal EnableDelayedExpansion
title WINDOWS 7 USB BOOTABLE OS TOOL
echo NOTE: Insert Your USB Thumbdrive and DVD then press any [KEY] to Begin...&&PAUSE>NUL
cls
title CREATE DISKPART SCRIPT AND INSTALLER BAT FILE
echo IMPORTANT: Make A Note of USB Disk#, and USB-DVD Drive Letters...
echo.
echo Then [Exit] out of Disk Management to Begin...
echo.
diskmgmt.msc
echo Did you get the USB Disk# and USB-DVD Drive Letters?
echo If So..Press Any [KEY] to Continue...&&PAUSE>NUL
cls
::==SET %VARIABLE% VALUES==::
set /p Disk=Please Enter USB Disk#:
if "%Disk%"=="" goto :eof
echo.
set /p USB=Please Enter USB Disk Letter:
if "%USB%"=="" goto :eof
echo.
set /p DVD=Please Enter CD-ROM/DVD Disk Letter:
if "%DVD%"=="" goto :eof
echo.
::==CREATE DISKPART SCRIPT FILE==::
echo>>Script.txt Select Disk %disk%
echo>>Script.txt Clean
echo>>Script.txt Create Partition Primary
echo>>Script.txt Select Partition 1
echo>>Script.txt Active
echo>>Script.txt Format FS=ntfs
echo>>Script.txt Assign letter=%usb% noerr
echo>>Script.txt End
::==============================================+
::==CREATE INSTALLER BATCH SCRIPT==::
echo> USB.Format.Tool.bat @echo off
echo>>USB.Format.Tool.bat color e
echo>>USB.Format.Tool.bat title W7 Bootable USB
echo>>USB.Format.Tool.bat DiskPart.exe /s Script.txt
echo>>USB.Format.Tool.bat echo.
echo>>USB.Format.Tool.bat echo.
echo>>USB.Format.Tool.bat echo +=================================================+
echo>>USB.Format.Tool.bat echo + Creating a Bootable USB Flash Drive. +
echo>>USB.Format.Tool.bat echo +=================================================+
echo>>USB.Format.Tool.bat echo.
echo>>USB.Format.Tool.bat xcopy %dvd%:\*.* %usb%:\ /s/e/h/f/c/q
echo>>USB.Format.Tool.bat echo.
echo>>USB.Format.Tool.bat echo.
echo>>USB.Format.Tool.bat cls
echo>>USB.Format.Tool.bat echo Your Thumbdrive OS Completed Successfully...
echo>>USB.Format.Tool.bat echo.
echo>>USB.Format.Tool.bat pause
echo>>USB.Format.Tool.bat exit
::==============================================+
cls
title ALL INSTALL FILES CREATED SUCCESSFULLY
color e
:echo All Files Have Been Created Successfully...
echo You Can Now..Dbl Click on USB.Format.Tool.bat to Install OS to USB...
echo.
echo Press any [KEY] to Close-Out this Screen...&&PAUSE>NUL
:EOF
Exit
:08-10-12: