spike4real Posted December 28, 2004 Share Posted December 28, 2004 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. Link to comment Share on other sites More sharing options...
Gagorian Posted December 28, 2004 Share Posted December 28, 2004 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. Link to comment Share on other sites More sharing options...
spike4real Posted December 28, 2004 Author Share Posted December 28, 2004 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 Link to comment Share on other sites More sharing options...
nateklomp Posted December 29, 2004 Share Posted December 29, 2004 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? Link to comment Share on other sites More sharing options...
spike4real Posted December 29, 2004 Author Share Posted December 29, 2004 No i havnt tried that??Any chance you could tell me abit more info bcuz it seems alot easierCheersDan. Link to comment Share on other sites More sharing options...
minigun Posted December 29, 2004 Share Posted December 29, 2004 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 Link to comment Share on other sites More sharing options...
Astalavista Posted December 29, 2004 Share Posted December 29, 2004 look at WPIit allows u to select the programs u want installed Link to comment Share on other sites More sharing options...
Npredator Posted December 29, 2004 Share Posted December 29, 2004 LOL...i'm very confused...Can anyone tell me were can i learn more about this commands??? Link to comment Share on other sites More sharing options...
Astalavista Posted December 29, 2004 Share Posted December 29, 2004 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now