spide21 Posted December 19, 2010 Share Posted December 19, 2010 Hi,I'm new to the forum and i am confused on how does Windows Setup know what letter has my cd drive?, What if i add another CD-drive or do an uninstall on another pc with many CD-DRIVESMay I modify the unattended.bat CD letter as follow:FROM:set AnswerFile=.\unattend.txtset SetupFiles=k:\amd64K:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:langTO:set AnswerFile=.\unattend.txtset SetupFiles=%CDROM%:\amd64%CDROM%:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:langthanks for your response in advanced. Link to comment Share on other sites More sharing options...
gunsmokingman Posted December 19, 2010 Share Posted December 19, 2010 Perhaps try this in your bat@Echo OffCLSMode 62, 9Color F9Set Char=C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:for %%i in (%Char%) do if exist %%i\SETUP.exe Goto Confirmfor %%i in (%Char%) do if not exist %%i\SETUP.exe Goto Missing:Confirmset CDROM=%%iset AnswerFile=.\unattend.txtset SetupFiles=%CDROM%:\amd64%CDROM%:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:langGoto TheEnd:Missingset CDROM=Error Unknown OccurCLSEcho.echo %CDROM%pauseGoto TheEnd:TheEndExit Link to comment Share on other sites More sharing options...
spide21 Posted December 20, 2010 Author Share Posted December 20, 2010 Perhaps try this in your bat@Echo OffCLSMode 62, 9Color F9Set Char=C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:for %%i in (%Char%) do if exist %%i\SETUP.exe Goto Confirmfor %%i in (%Char%) do if not exist %%i\SETUP.exe Goto Missing:Confirmset CDROM=%%iset AnswerFile=.\unattend.txtset SetupFiles=%CDROM%:\amd64%CDROM%:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:langGoto TheEnd:Missingset CDROM=Error Unknown OccurCLSEcho.echo %CDROM%pauseGoto TheEnd:TheEndExitThanks for your response, I'll give it a try. Link to comment Share on other sites More sharing options...
manvindar Posted December 21, 2010 Share Posted December 21, 2010 u can use the following code in your bat file++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++echo offclsfor /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++so u can point to files on your disk aseg.,echo Installing Directx 9c%source%\i386\svcpack\dx.exe Link to comment Share on other sites More sharing options...
nbliang Posted July 21, 2011 Share Posted July 21, 2011 Perhaps try this in your bat@Echo OffCLSMode 62, 9Color F9Set Char=C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:for %%i in (%Char%) do if exist %%i\SETUP.exe Goto Confirmfor %%i in (%Char%) do if not exist %%i\SETUP.exe Goto Missing:Confirmset CDROM=%%iset AnswerFile=.\unattend.txtset SetupFiles=%CDROM%:\amd64%CDROM%:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:langGoto TheEnd:Missingset CDROM=Error Unknown OccurCLSEcho.echo %CDROM%pauseGoto TheEnd:TheEndExitThanks a lot !! 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