Author Topic: Need help on this \"Choose your own xp instal dir\"  (Read 1209 times)

Space Between

  • Guest
Need help on this \"Choose your own xp instal dir\"
« on: October 24, 2002, 10:25:20 PM »
ive been copy and pasting, adding and deleting, and just searching for info on how to do this. According to the help microsoft provides you can choose your own install directory for winxp with winnt/winnt32. This envolve\'s the /t:(tempdrive) switch. Tonight i spent some hours doing what i listed above and came up with this batch file so far. It requires certain .com\'s and .exe\'s to be put on the same floopy disk or image...but it works. You could load the files off the cd too. Anyhow it assume\'s...for now that your ramdrive is D: and outputs a .bat file to be called install.bat to D:(or whatever your ramdrive really is)

just thought i could get some advice on what to change or even if this will work. This seems to be a start though...this took forever to track down the information for me on how to set it up (im slow and didnt know to FC for user input).

here it is below...alittle big but worth it (if it winds up working someday). Start copying from the @ and all the way to the bottom...run it and tell me if it has a chance for what we are trying to do make happen.




@echo off
rem You will need the following files
rem for this to work with your floppy.
rem FC.EXE
rem FIND.EXE
rem CHOICE.COM
rem DEBUG.EXE
rem SMARTDRV.EXE

if \"%1\"==\"GoTo:\" %1%2


%COMSPEC% /e:1024 /c %0 GoTo: start
goto eof
:start

SET T1=%TEMP%.TEMP1.BAT
SET T2=%TEMP%.TEMP2.BAT
SET F1=%TEMP%.TEMP3.BAT
SET F2=%TEMP%.TEMP4.BAT

echo e100\'SET  INPUT=\'> %F1%
for %%? in (w q) do echo %%?>> %F1%
echo @PROMPT Invalid input. Invalid characters: $Q $L $G $B$_> %T1%
%COMSPEC% /y:1024 /c %T1% > %T2%
FIND.exe \":\" < %T2% > %F2%

echo.
echo Enter your installation directory now:
echo You must type a drive letter aswell
echo example... D:winxp
echo.
rem The /b switch is used for blank entries.
call %0 GoTo: input inst /b

echo.
echo Enter unattended filename now:
echo.
rem Make sure file is in the same directory as the i386 folder
call %0 GoTo: input unat /b

echo.
echo Enter a folder named to be copied:
echo.
rem Make sure the folder is in the same directory as the i386 folder
call %0 GoTo: input fold /b

echo.
echo Enter a command to be run after GUI-Mode Setup:
echo.
call %0 GoTo: input runo /b
echo.

if \"%INST%\"==\"\" goto addb
set INSA=/t:%INST%
set opta=echo Installation of WinXP to %INST%

:addb
if \"%UNAT%\"==\"\" goto addc
set UNAB= /u:%UNAT%
set optb=echo With the unattend file %UNAT%

:addc
if \"%FOLD%\"==\"\" goto addd
set FOLC= /r:%FOLD%
set optc=echo Copying the %FOLD% folder

:addd
if \"%RUNO%\"==\"\" goto menuone
set RUND= /e:%RUNO%
set optd=echo And running %RUNO% after setup???

:menuone
echo.
echo Will these options below work for your installation ?
echo ----------------------------------------------
%opta%
%optb%
%optc%
%optd%
echo ----------------------------------------------
echo Press y for yes
echo Press n for no
echo.
choice.com \"Waiting (Forever)...\" /c:yn /n
if errorlevel=2 goto seeya
if errorlevel=1 goto contin

:seeya
cls
echo.
echo Would you like to try this again
echo or do you want to quit???
echo.
echo Press t for try again
echo Press q for quit
echo.
choice.com \"Waiting (Forever)...\" /c:tq /n
if errorlevel=2 goto itsover
if errorlevel=1 goto again


:contin
echo YOURCDROMUENGLISHWINXPI386winnt /s:YOURCDROMUENGLISHWINXPWINNT %INSA%%UNAB%%FOLC%%RUND% >> D:install.bat
goto eof

:itsover
for %%? in (%T1% %T2% %F1% %F2%) do if exist %%? del %%?
goto eof

:again
for %%? in (%T1% %T2% %F1% %F2%) do if exist %%? del %%?
goto start

:input
echo.> %T1%
FC.exe con nul /lb1 /n > %T2%
FIND.exe \"1:\" < %T2% >> %T1%
FIND.exe \"|\" < %T1% > nul
if not errorlevel=1 goto input_e1
FIND.exe \"<\" < %T1% > nul
if not errorlevel=1 goto input_e1
FIND.exe \">\" < %T1% > nul
if not errorlevel=1 goto input_e1
FIND.exe \"=\" < %T1% > nul
if not errorlevel=1 goto input_e1
DEBUG %T1% < %F1% > nul
call %T1%
if not \"%4\"==\"/b\" if \"%input%\"==\"\" goto input_e2
set %3=%input%
goto eof
:input_e1
type %F2%
goto input
:input_e2
echo Something was not blank...try again.
goto input

:eof
exit

Space Between

  • Guest
Need help on this \"Choose your own xp instal dir\"
« Reply #1 on: October 25, 2002, 10:59:11 PM »
Ok i got a 2 questions... Frist can i attach post\'s if im not running mozilla??? i dont see a option to in ie5.0

next ?

i just created a (working out flaws now) a .bat file that can run the winnt.exe command and also you can create a basic unattend.txt file with it to run with winnt.exe...so if this works it will let you install a dir that way.

ok time for the real ?. after someone create\'s a unattend.txt file with my .bat file here...how can they use it??? You can save it to where ever you want. So could you save it to the ram drive??? I know windows requires a location of the unattend.txt. What i dont know is...after it copies over the files and reboots does it copy the unattend.txt file over with the setup files??? or does it want he unattend.txt in the same spot as you ran with winnt.exe.

if it does want it in the same spot...it can\'t be done as is right now. Right not it save\'s to ram drive or you have the option of saving it to a floppy. The floppy would work...but if you dont have one then yoru screwed.

Ok asssuming you dont have a floppy to save it to. Could you do this.

Save the unattend.txt file created with my .bat to a directory in ramdrive. Then have all the setup files copy over to the same directory. Then when it starts\' copying the files...take mine with those file\'s to save to the drive. Can this be done??? or will it copy it over anyways. I hope it just copies it over and no longer require\'s the floppy. If it can copy it over somehow...will it run it??? i just dont know how it works out. Could you put a line above the unattend.txt that is in hex value\'s or assmebler to trick the computer to thinking it was in the A: as soon as it opens it then carry on??

i need help on this BIG time...my .bat only needs to be touched up...i hope this is not all for nothing.

Space Between

  • Guest
Need help on this \"Choose your own xp instal dir\"
« Reply #2 on: October 27, 2002, 08:14:30 PM »
I really need some advice on the winnt thingy. Im not sure how it all works out. Ive now created a batch file to do most of what the setup manager does in win2k...and i guess xp. The only thing i have left off is the printers section. Ive never had a printer or even tried to install one ever. Actually i take that back i have had one but all i did was plug it in and it works. I usually have friends print the graphical things for me since they have access to hardware much better than what you could buy at a store typically...and for the black and white stuff i just print that at school.

Anyhow it\'s finished i guess. It would only take about another hour and i could have the batch file a clone of setup manager. It works in dos....so it can be run from a floppy or whatever.

Here\'s what i got so far...again i really need to know if i can attach files in ie 5.0.

This has not been tested yet...the last one above was tested but this one is not...but from what i can tell it works. Im going to work on it just alittle bit more to see if i can get it to a setup manager clone...this works. But will it copy over after you reboot???? i dont know. My next post with a batch file example will be the final one...this one allows MOST options of setup manager and also allows you to add tags and more options provided you know the syntax of course.

Could someone else besides me test this out to tell me what you think???

@echo off
rem You will need the following files
rem for this to work with your floppy.
rem FC.EXE FIND.EXE CHOICE.COM DEBUG.EXE


if \"%1\"==\"GoTo:\" %1%2

%COMSPEC% /e:1024 /c %0 GoTo: start
goto eof
:start

SET T1=%TEMP%.TEMP1.BAT
SET T2=%TEMP%.TEMP2.BAT
SET F1=%TEMP%.TEMP3.BAT
SET F2=%TEMP%.TEMP4.BAT

echo e100\'SET  INPUT=\'> %F1%
for %%? in (w q) do echo %%?>> %F1%
echo @PROMPT Invalid input. Invalid characters: $Q $L $G $B$_> %T1%
%COMSPEC% /y:1024 /c %T1% > %T2%
FIND.exe \":\" < %T2% > %F2%

echo.
echo.
echo ---This is the setup for the command line to run
echo with winnt.exe. This is for setting up Win2k/WinXP
echo through DOS from like a Win98 boot floppy.
echo You have to use this if you want to do that.
echo ---However you do not have to set for example a
echo unattend.txt file for installation.
echo ---I and everyone else, suggest you do use a
echo unattend.txt. It can skip alot of things for you
echo and access options you can\'t get from winnt.exe
echo or a plain setup from the cd or boot floppies.
echo Not too mention it speeds the installation up
echo ALOT becuase you dont have to type in everything
echo at different times. For example if you use
echo FullUnattended you dont have to type anything again.
pause

echo.
echo Press s to try everything
echo Press x to exit this
echo Press a to only create a unattended file
echo.
CHOICE.COM \"Waiting Forever...\" /c:sxa /n
if errorlevel=3 goto quicker
if errorlevel=2 goto eof
if errorlevel=1 goto bgnitalz


:bgnitalz
echo.
echo.
echo You can leave a option totally blank if you want.
echo This means you have to not press a key...or if you do
echo hit backspace. After that just press enter. This
echo will use the default option if one set or eliminate
echo that option completely.
echo.
echo.
pause

echo.
echo.
echo Would you like to change the source path of the
echo installation files? If you choose no the default
echo is used. The default should be the location for
echo this disc. If not, then you will have to specify
echo these options. It\'s suggest to first try the default
echo then if that doesnt work rerun this again with the
echo correct path.
echo.
echo Press d to use the default source path
echo Press c to change the source path
echo.
CHOICE.COM \"Waiting Forever...\" /c:dc /n
if errorlevel=2 goto chngspat
if errorlevel=1 goto tmdrvchan

:chngspat
echo.
echo What is the source path for the setup files?
echo.
echo Note you need to type the location of the winnt.exe
echo and the src path for the setup files.
echo.
echo Example below
echo.
echo C:i386winnt.exe c:i386
echo.
call %0 GoTo: input srcpath /b

:tmdrvchan
echo.
echo Enter a temp drive to copy files to for setup.
echo You must type a drive letter aswell for this.
echo (i.e. C:tempinst or c:temp ...whatever)
echo.
echo NOTE: You cannot have setup find a partition
echo automatically in the unattend.txt if you choose
echo a temp drive now.
echo.
echo Enter the location of the temp drive now:
echo.
rem The /b switch is used for blank entries.
call %0 GoTo: input inst /b

echo.
echo Enter unattended filename now:
echo  (If you dont enter a filename for this
echo   in the next step you will be asked to
echo   create a unattend.txt file. If you choose
echo   yes there then the default filename will be
echo   F:unattend.txt unless you name it now.)
echo.
echo.
call %0 GoTo: input unat /b
if \"%UNAT%\"==\"\" goto damnmenfoit
if not \"%INST%\"==\"\" goto skipz

:damnmenfoit
echo.
echo Would you like to create a unattend.txt file now
echo or skip it? If you skip this you will not create
echo a file for unattended setup.
echo.
echo It is HIGHLY recommended that you create a file
echo for unattended setup!
echo.
echo Press y for yes
echo Press n for no
echo.
CHOICE.COM \"Waiting Forever...\" /c:yn /n
if errorlevel=2 goto :menutwo
if errorlevel=1 goto :quicker

:quicker
echo.
echo Enter a name for you Unattended setup file now.
echo.
echo If you do not enter a name it will default to
echo F:unattend.txt
echo.
call %0 GoTo: input UNAT /b
if \"%UNAT%\"==\"\" goto dfuntfilnmey
goto chosuntfil

:dfuntfilnmey
set UNAT=C:xpprojectestinga.txt

rem this section is the creation of a unattend.txt
rem the below is to echo the non ecoable character of
rem ;

:chosuntfil
echo e100 3B\'SetupMgrTag\'> %TEMP%.TEMP1.DAT
for %%? in (rcx C w q) do echo %%?>> %TEMP%.TEMP1.DAT
type nul > %TEMP%.TEMP2.DAT
DEBUG %TEMP%.TEMP2.DAT < %TEMP%.TEMP1.DAT > nul
echo.>> %TEMP%.TEMP2.DAT
type %TEMP%.TEMP2.DAT >> %UNAT%
del %TEMP%.TEMP?.DAT


echo.
echo Would you like setup to find a partition?
echo (this means it will find the first available
echo  partition and used that.)
echo.
echo Press y for yes
echo Press n for no
echo.
CHOICE.COM \"Waiting Forever...\" /c:yn /n
if errorlevel=2 goto skipz
if errorlevel=1 goto partonz

:skipz
echo [Data] >> %UNAT%
echo     AutoPartition=0 >> %UNAT%
echo     MsDosInitiated=0 >> %UNAT%
echo     UnattendedInstall=\"Yes\" >> %UNAT%
goto timetos

:partonz
echo [Data] >> %UNAT%
echo     AutoPartition=1 >> %UNAT%
echo     MsDosInitiated=0 >> %UNAT%
echo     UnattendedInstall=\"Yes\" >> %UNAT%

:timetos
echo.
echo Choose a number for which mode you would like to use:
echo.
echo.
echo 1 ProvidedDefault  (Fills in text area that you can change)
echo 2 DefaultHide  (Hides Wizard page\'s that have all answers)
echo 3 FullUnattended  (Requires no user input for anything)
echo 4 GuiAttended  (In setup wizard you cant change anything)
echo 5 ReadOnly  (Text-Mode part of Windows Setup is automated)
echo.
echo Choose a number that corresponds to your selection
ehco.
CHOICE.COM \"Waiting Forever...\" /c:12345 /n
if errorlevel=1 set unatmode=ProvidedDefault
if errorlevel=2 set unatmode=DefaultHide
if errorlevel=3 set unatmode=FullUnattended
if errorlevel=4 set unatmode=GuiAttended
if errorlevel=5 set unatmode=ReadOnly

echo. >> %UNAT%
echo [Unattended] >> %UNAT%
echo     UnattendMode=%unatmode% >> %UNAT%
goto blahoemstuff



:blahoemstuff
echo.
echo Would you like to use the $oem$ folder?
echo.
echo Press y for yes
echo Press n for no
echo.
CHOICE.COM \"Waiting Forever...\" /c:yn /n
if errorlevel=2 goto bignoonthat
if errorlevel=1 goto whydiditnotwork
:bignoonthat
echo     OemPreinstall=No >> %UNAT%
goto oldopt
:whydiditnotwork
echo     OemPreinstall=Yes >> %UNAT%
goto oldopt

rem the above label means that using the
rem if errorlevel=1 set varoem=Yes and NO
rem that didnt work for some reason with
rem that choice command


:ryag
echo.
echo.
echo.
echo ******** You MUST type a name. And it can be
echo ******** no longer than 8 characters.
echo.
echo.
echo.
pause
:oldopt
echo.
echo Enter a folder name to install WinXP to:
echo (This name must be no longer than 8 characters)
echo (Make sure it\'s not longer than 8 characters)
echo (Also only use numbers and letters)
echo.
call %0 GoTo: input dirtoins /b
if \"%dirtoins%\"==\"\" goto ryag
echo     TargetPath=%dirtoins% >> %UNAT%
echo. >> %UNAT%
echo [GuiUnattended] >> %UNAT%
echo     EncryptedAdminPassword=NO >> %UNAT%



echo.
echo Do you want windows to log you on after install?
echo If so enter the number of times you want it to:
echo  (If not just hit enter)
echo.
call %0 GoTo: input utolog /b
if \"%utolog%\"==\"\" goto uvckon
echo     AutoLogon=Yes >> %UNAT%
echo     AutoLogoncount=%utolog% >> %UNAT%





echo.
:uvckon
echo. >> %UNAT%
echo Enter your cd key to install WinXP;
echo (i.e.: 11111-11111-11111-11111-11111)
echo.
call %0 GoTo: input cdkey /b
echo [UserData] >> %UNAT%
if \"%cdkey%\"==\"\" goto skia
echo     ProductID=%cdkey% >> %UNAT%
echo.

:skia
echo Enter your name:
echo.
call %0 GoTo: input yournam /b
if \"%yournam%\"==\"\" goto yoieees
echo     FullName=%yournam% >> %UNAT%
goto ompnaifcc
:yoieees
echo     FullName=\"\" >> %UNAT%

:ompnaifcc
echo.
echo Enter your company name:
echo.
call %0 GoTo: input compnam /b
if \"%compnam%\"==\"\" goto skic
echo     OrgName=%compname% >> %UNAT%
goto terssnamz
:skic
echo     OrgName=\"\" >> %UNAT%

:terssnamz
echo.
echo Enter your computer name:
echo.
call %0 GoTo: input puternam /b
if \"%puternam%\"==\"\" goto skiddd
echo     ComputerName=%puternam% >> %UNAT%





:skiddd
echo.
echo Would you like to set the display properites?
echo  (This is totally optional and not need at all)
echo.
echo Press y for yes
echo Press n for no
echo.
CHOICE.COM \"Waiting Forever...\" /c:yn /n
if errorlevel=2 goto skipa
if errorlevel=1 goto touwsssl

:touwsssl
echo.
echo Enter the display properties:
echo.
echo (You can hit enter to skip this entirely.
echo  If you choose to set these display properties
echo  you will have to fill them out correctly. So
echo  if you dont know, dont try this)
echo.
echo.
echo Bits per pixel
echo (i.e. 256,24,32 (32 is true color))
echo.
call %0 GoTo: input pixels /b
if \"%pixels%\"==\"\" goto skipa
echo. >> %UNAT%
echo [Display] >> %UNAT%
echo     BitsPerPel=%pixels% >> %UNAT%

echo.
echo Enter the X resolution
echo (i.e. The 1024 is X in the res of 1024 x XXX):
echo.
call %0 GoTo: input xres /b
echo     Xresolution=%xres% >> %UNAT%

echo.
echo Enter the Y resolution
echo (i.e. The 768 is Y in the res of XXXX x 768):
echo.
call %0 GoTo: input yres /b
echo     Yresolution=%yres% >> %UNAT%


echo.
echo Enter your refresh rate:
echo (i.e. 60 is common for 1024x768. The number you
echo enter will be the amount of hertz for the monitor
echo display. Do NOT type in 60hz, just 60)
echo.
call %0 GoTo: input refres /b
echo     Vrefresh=%refres% >> %UNAT%




:skipa
echo.
echo Enter your telephone area code #:
echo (i.e. This is 800 in the # of 1-800-555-5555)
echo (This is for your modem or whatever)
echo.
call %0 GoTo: input arecod /b
if \"%arecod%\"==\"\" goto skig
echo. >> %UNAT%
echo [TapiLocation] >> %UNAT%
echo     AreaCode=%arecod% >> %UNAT%


:skig
echo.
echo Would you like to set either a home page,
echo help page, or search page for Internet
echo Explorer during installation?
echo.
echo Press y for yes
echo Press n for no
echo.
CHOICE.COM \"Waiting Forever...\" /c:yn /n
if errorlevel=2 goto skih
if errorlevel=1 goto yurpagezetn


:yurpagezetn
echo.
echo You can leave any page setting blank
echo.
echo.
echo Enter your Home Page:
echo.
call %0 GoTo: input homepag /b
if \"%homepag%\"==\"\" goto skiii
echo. >> %UNAT%
echo [Branding] >> %UNAT%
echo     BrandIEUsingUnattended=Yes >> %UNAT%
echo. >> %UNAT%
echo [URL] >> %UNAT%
echo     Home_Page=%homepag% >> %UNAT%


:skiii
echo.
echo Enter your Help Page:
echo.
call %0 GoTo: input helppag /b
if \"%helppag%\"==\"\" goto skijjj
if \"%homepag%\"==\"\" goto :ppoott
echo     Help_Page=%helppag% >> %UNAT%
goto skijjj

:ppoott
echo. >> %UNAT%
echo [Branding] >> %UNAT%
echo     BrandIEUsingUnattended=Yes >> %UNAT%
echo. >> %UNAT%
echo [URL] >> %UNAT%
echo     Help_Page=%helppag% >> %UNAT%


:skijjj
echo.
echo Enter your Search Page:
echo.
call %0 GoTo: input searchpag /b
if \"%searchpag%\"==\"\" goto skih
if \"%homepag%%helppag%\"==\"\" goto :lokiki
echo     Search_Page=%searchpag% >> %UNAT%
goto skih

:lokiki
echo. >> %UNAT%
echo [Branding] >> %UNAT%
echo     BrandIEUsingUnattended=Yes >> %UNAT%
echo. >> %UNAT%
echo [URL] >> %UNAT%
echo     Search_Page=%searchpag% >> %UNAT%
if \"%searchpag%%homepag%%helppag%\"==\"\" goto alofskip




:skih
:alofskizaa
echo.
:alofskip
echo You can add commands here to run at startup. You
echo have to enter the command number then the command.
echo Not both at once. Press a for more help on this.
echo.
echo When your done adding commands just hit enter
echo.
echo Press e to enter commands
echo.
echo (NOTE: do not choose e if your adding commands.
echo  This will add a extra tag and your file may not work)
echo.
echo Press c to cancel this option or if you did it already
echo Press x to see a example
echo Press a to add more commands to the list
echo.
CHOICE.COM \"Waiting Forever...\" /c:ecxa /n
if errorlevel=4 goto entrunnadd
if errorlevel=3 goto exmpofrnc
if errorlevel=2 goto skprnonc
if errorlevel=1 goto entrunnxn

:exmpofrnc
echo.
echo You need to press the command number first.
echo After that you will be prompted for the command
echo line to run. Example below
echo.
echo 0 (press enter)
echo comandline now (press enter)
echo.
echo The command numbers do not have following 0\'s.
echo Just start at 0, then after that one is done
echo you will be prompted for another number. Now you
echo need to press 1. After you get pass 9 press 10.
echo remember no leading 0\'s for 1-9.
echo.
echo When done leave line blank and hit enter
echo.
pause \"Hit any key to go back to menu\"
goto alofskip




:entrunnxn
echo. >> %UNAT%
echo [GuiRunOnce] >> %UNAT%
:entrunnadd
echo.
echo.
echo Enter ONLY the Command# now.
echo.
echo Or press Enter to go back to menu
echo.
echo.
call %0 GoTo: input cmdnument /b
if \"%cmdnument%\"==\"\" goto alofskip


:entruncmd
echo.
echo Now enter the command to run.
echo.
echo Example copy C:drivers d:backup
echo.
echo.
call %0 GoTo: input cmdcmdline /b
if \"%cmdcmdline%\"==\"\" goto entruncmxx
echo     Command%cmdnument%=%cmdcmdline% >> %UNAT%
goto entrunnadd

:entruncmxx
echo.
echo.
echo.
echo ******* Are you sure you dont want to
echo ******* enter a command for this number?
echo.
echo Press y for yes
echo Press n for no
echo.
echo.
CHOICE.COM \"Waiting Forever...\" /c:yn /n
if errorlevel=2 goto entruncmd
if errorlevel=1 goto entrunnxn




:skprnonc
echo.
echo Enter your Work Group Name:
echo.
call %0 GoTo: input worgrou /b
if \"%worgrou%\"==\"\" goto noworgrj
echo. >> %UNAT%
echo [Identification] >> %UNAT%
echo     JoinWorkgroup=%worgrou% >> %UNAT%
echo. >> %UNAT%
echo [Networking] >> %UNAT%
echo     InstallDefaultComponents=Yes >> %UNAT%
goto menuoccvvbx

:noworgrj
echo. >> %UNAT%
echo [Identification] >> %UNAT%
echo     JoinWorkgroup=WORKGROUP >> %UNAT%
echo. >> %UNAT%
echo [Networking] >> %UNAT%
echo     InstallDefaultComponents=Yes >> %UNAT%


:menuccvvbx
echo.
echo You have the option to type in more options.
echo However you will need to know all the syntax.
echo That include\'s the Tags and option lines.
echo.
echo Press s to skip this and continue
echo Press a to add more lines
echo.
CHOICE.COM \"Waiting Forever...\" /c:sa /n
if errorlevel=2 goto optnallinsz
if errorlevel=1 goto menuone

:optnallinsz
echo.
echo Type the Tag First. Then hit enter. Then
echo you can type the option\'s for that tag.
echo.
echo Remember tag\'s have [] around them.
echo.
echo Press Enter to go back to menu
echo.
call %0 GoTo: input optanltag /b
if \"%optanltag%\"==\"\" goto menuccvvbx
echo. >> %UNAT%
echo %optanltag% >> %UNAT%
goto optcmdfortag

:optcmdfortag
echo.
echo Type the option for your entered tag now.
echo.
echo Leave input blank and press Enter when you
echo are done adding options to this Tag.
echo.
call %0 GoTo: input optcmdfortg /b
if \"%optcmdfortg%\"==\"\" goto optnallinsz
echo     %optcmdfortg% >> %UNAT%
goto optcmdfortag

:menuone
if \"%INST%\"==\"\" goto addb
set INSA= /t:%INST%
set opta=echo Using the temp drive option of %INST%

:addb
set UNAB= /u:%UNAT%
set optb=echo With the unattend file %UNAT%

set rdsr=echo With the Sourch Pat of %SRCPATH%

:menutwo
echo.
echo Will these options below work for your winnt.exe
echo command line installation ?
echo (This info is from the first part before the
echo  unattend.txt options. You will not see the
echo  options for the unattend.txt.)
echo.
echo ----------------------------------------------
%rdsr%
%opta%
%optb%
echo ----------------------------------------------
echo.
echo Press y for yes
echo Press n for no
echo.
choice.com \"Waiting (Forever)...\" /c:yn /n
if errorlevel=2 goto seeya
if errorlevel=1 goto contin

:seeya
cls
echo.
echo Would you like to try this over again?
echo.
echo Or is this ok???
echo.
echo Press t for try again
echo Press o if it\'s ok
echo.
choice.com \"Waiting (Forever)...\" /c:to /n
if errorlevel=2 goto itsover
if errorlevel=1 goto again


:contin

rem the final output

echo.
echo Enter a name and location to save your
echo winnt.exe command line file.
echo.
echo (This is not the unatted.txt. That is located
echo at %UNAT%)
echo.
echo You can press Enter to skip this and your file
echo will be saved as D:Winnt.bat
echo.
echo Enter the name and location now.
call %0 GoTo: input nmofwintfil
if \"%nmofwintfil%\"==\"\" goto dfltntfilnm
echo %SRCPATH%%INSA%%UNAB% >> %nmofwintfil%
goto ltrfrnd

:dfltntfilnm
set nmofwintfil=D:Winnt.bat
echo %SRCPATH%%INSA%%UNAB% >> %nmofwintfil%

:ltrfrnd
echo.
echo You have completed everything and ready to install.
echo.
echo Would you like to install now??
echo.
echo Press y for yes
echo Press n for no
CHOICE.COM \"Waiting Forever one last time...\" /c:yn /n
if errorlevel=2 goto itsover
if errorlevel=1 call %nmofwintfil%

:itsover
for %%? in (%T1% %T2% %F1% %F2%) do if exist %%? del %%?
goto eof

:again
for %%? in (%T1% %T2% %F1% %F2%) do if exist %%? del %%?
echo.
echo Delete your winnt.exe file named the below?
echo.
echo %nmofwintfil%
echo.
echo Press y for yes
echo Press n for no
echo.
CHOICE.COM \"Waiting Forever...\" /c:yn /n
if errorlevel=2 goto dleteuntfile
if errorlevel=1 del %nmofwintfil%
goto delcnfrmw

:delcnfrmw
if exist %nmofwintfile% echo Your %nmofwintfile% has not been deleted.
if not exist %nmofwintfile% echo Your %nmofwintfile% has been deleted.
echo.
pause

:dleteuntfile
echo.
echo Delete your file for the unattended install
echo that is named the below??
echo.
echo %UNAT%
echo.
echo Press y for yes
echo Press n for no
echo.
CHOICE.COM \"Waiting Forever...\" /c:yn /n
if errorlevel=2 goto dletecnunat
if errorlevel=1 del %UNAT%

:dletecnunat
if exist %UNAT% echo Your %UNAT% has not been deleted.
if not exist %UNAT% echo Your %UNAT% has been deleted.
echo.
echo Press Enter to go back and try everything again.
pause
goto start

:input
echo.> %T1%
FC.exe con nul /lb1 /n > %T2%
FIND.exe \"1:\" < %T2% >> %T1%
FIND.exe \"|\" < %T1% > nul
if not errorlevel=1 goto input_e1
FIND.exe \"<\" < %T1% > nul
if not errorlevel=1 goto input_e1
FIND.exe \">\" < %T1% > nul
if not errorlevel=1 goto input_e1
FIND.exe \"=\" < %T1% > nul
if not errorlevel=1 goto input_e1
DEBUG %T1% < %F1% > nul
call %T1%
if not \"%4\"==\"/b\" if \"%input%\"==\"\" goto input_e2
set %3=%input%
goto eof
:input_e1
type %F2%
goto input
:input_e2
echo Invalid input. Input may not be blank.
goto input


:eof

Space Between

  • Guest
Need help on this \"Choose your own xp instal dir\"
« Reply #3 on: October 28, 2002, 09:16:50 PM »
Ok i said fuc it. I didnt clone the setupmanger..i tried...i really did. Remember when i said it would take a hour??? well no. I was at about 80% complete and that took little old me about 4 hours. I said fuc it...ript it all out. It was way to stupid to even try. If i didnt have to set all those damn variable\'s and have them checked it would of been cool...but its out.

NOTE: Using EDIT.COM would be way way faster. Although it is a large file....it would be faster to just save a default unattend.txt somewhere on the disc and open it in EDIT.COM. The only thing i can dig up that this might have a advantage over is that it has more programs to allow more functionality. Also this way is still smaller and maybe for the less comfortable in EDIT.COM (if there is a person) this is more direct.

Only thing i added (as far as i can remember) is the option to set a name for your $oem$. Like $1 in $oem$$1. oh yeh the option to skip the OemSkipWelcome=Yes or No. Maybe some other stuff too.

At anyrate it\'s done...would anybody like to try it??? I dont and wont install XP so im in the whole and dont even know why i did this. However i got 95% of this material at http://www.batch.hpg.ig.com.br/ and another part from a link on that page...so basically all from there. He has much more than this. Check it out.