View unanswered posts | View active topics It is currently 22 Oct 2014 03:35



Post new topic Reply to topic  [ 4 posts ] 
SFX script problem.. 
Author Message

Joined: 21 Nov 2010 08:07
Posts: 225
Location: At My Computer
Post SFX script problem..
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

Code:
@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:


11 Aug 2012 18:20
Profile

Joined: 10 Feb 2012 02:20
Posts: 4314
Post Re: SFX script problem..
You have three tests for conditions where it can skip the file creation, and also the possibility that the files are being created in a location that you don't expect them.

To debug this you can change the three goto :eof to pause, to see if you are dropping out of the bat.


I don't see where winrar is involved...


12 Aug 2012 00:44
Profile

Joined: 21 Nov 2010 08:07
Posts: 225
Location: At My Computer
Post Re: SFX script problem..
Quote:
I don't see where winrar is involved


Foxi, I am using Winrar to create a sfx .exe file as I said in my Post...
also as i said the script works great, it creates the files to current or local..
but now I figured out what the issue is and have got it working with the sfx file
basically all that needed to be done was echo> to the desktop per updated code below ...
Code:
::==CREATE DISKPART SCRIPT FILE==::
echo>>%userprofile%\desktop\Script.txt Select Disk %disk%
echo>>%userprofile%\desktop\Script.txt Clean
echo>>%userprofile%\desktop\Script.txt Create Partition Primary
echo>>%userprofile%\desktop\Script.txt Select Partition 1
echo>>%userprofile%\desktop\Script.txt Active
echo>>%userprofile%\desktop\Script.txt Format FS=ntfs
echo>>%userprofile%\desktop\Script.txt Assign letter=%usb% noerr
echo>>%userprofile%\desktop\Script.txt End
::==============================================+
::==CREATE INSTALLER BATCH SCRIPT==::
echo>>%userprofile%\desktop\USB.Format.Tool.bat @echo off
echo>>%userprofile%\desktop\USB.Format.Tool.bat color e
echo>>%userprofile%\desktop\USB.Format.Tool.bat title W7 Bootable USB
echo>>%userprofile%\desktop\USB.Format.Tool.bat DiskPart.exe /s Script.txt
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo.
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo.
echo>>%userprofile%\desktop\%userprofile%\desktop\USB.Format.Tool.bat echo +=================================================+
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo +      Creating a Bootable USB Flash Drive.       +
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo +=================================================+
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo.
echo>>%userprofile%\desktop\USB.Format.Tool.bat xcopy %dvd%:\*.*  %usb%:\ /s/e/h/f/c/q
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo.
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo.
echo>>%userprofile%\desktop\USB.Format.Tool.bat cls
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo Your Thumbdrive OS Completed Successfully...
echo>>%userprofile%\desktop\USB.Format.Tool.bat echo.
echo>>%userprofile%\desktop\USB.Format.Tool.bat pause
echo>>%userprofile%\desktop\USB.Format.Tool.bat exit
::==============================================+


12 Aug 2012 11:22
Profile

Joined: 10 Feb 2012 02:20
Posts: 4314
Post Re: SFX script problem..
foxidrive wrote:
the possibility that the files are being created in a location that you don't expect them.


So, this was the issue.


12 Aug 2012 16:38
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: Bing [Bot] and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forums/DivisionCore.