December 28, 200421 yr First of all i'd like to say thanks to everyone for this creating this great forum. I've been reading posts for most of the day and i've learn loads!!I've created a DVD with XP Pro w/ SP2 + Drivers + Office 2003. All of which are working perfectly and there is more soon to be added.But anyway, Office is installed using a batch file but is there a way to have a simple Yes or No question in a batch file?? Basically so it waits for the user to say wether it wants this program installing or not by pressing Y or N??I know thats taking away the whole 'unattended' idea but it would be very helpful to me. Cheers Dan.
December 28, 200421 yr For example..Microsoft: http://support.microsoft.com/default.aspx?...B;EN-US;Q77457&orhttp://www.robvanderwoude.com/userinput.htmlHope that was of any help.*Edit* Ooops, pasted the wrong link. Now it's fixed.
December 28, 200421 yr Author Thanks for pointing me in the right direction!! The working code is as follows...CLS@echo offTITLE Windows XP PRO w/ SP2 - Unattended InstallationECHO.ECHO Nearly Done!!!ECHO.ECHO Removing stupid shortcuts...DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Set Program Access and Defaults.lnk"DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Catalog.lnk"type nul>%temp%\~YesOrNo.tmpecho Would You Like To Install Office 2003 Pro [y/n]?del /p %temp%\~YesOrNo.tmp>nulif not exist %temp%\~YesOrNo.tmp goto YesEcho Selected "No"del %temp%\~YesOrNo.tmpgoto end:YesEcho Selected "Yes"ECHO.ECHO Installing Office 2003 Pro ECHO Please wait...start /wait %systemdrive%\install\Applications\Office2003\setup.exe TRANSFORMS=Unattended.MST /qb-ECHO.ECHO Restarting the PC in 10 seconds...shutdown.exe -r -f -t 10 -c "Windows XP will restart in 10 seconds, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!":EndECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\installEXIT
December 29, 200421 yr type nul>%temp%\~YesOrNo.tmpecho Would You Like To Install Office 2003 Pro [y/n]?del /p %temp%\~YesOrNo.tmp>nulif not exist %temp%\~YesOrNo.tmp goto YesEcho Selected "No"del %temp%\~YesOrNo.tmpgoto end:YesEcho Selected "Yes"Geez, but that looks overly complicated.Tried the SET /P command?
December 29, 200421 yr Author No i havnt tried that??Any chance you could tell me abit more info bcuz it seems alot easierCheersDan.
December 29, 200421 yr from a thread i created awile ago...@echo offTITLE:startset /p userinp=whatever y/n??set userinp=%userinp:~0,1%if "%userinp%"=="Y" goto yesif "%userinp%"=="y" goto yesif "%userinp%"=="N" goto noif "%userinp%"=="n" goto noecho invalid choicegoto start:yesdo somethinggoto end:nodo something elsegoto end:end exit
December 29, 200421 yr LOL...i'm very confused...Can anyone tell me were can i learn more about this commands???
December 29, 200421 yr what commands are u talking aboutbatch commandsrunonceex.cmd commandswpi commandsexplode commandsu can start at http://unattended.msfn.org take about a 2 weeks to learnthe difference.
Create an account or sign in to comment