Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unattended.bat file CD Drive letter discovery how to

Featured Replies

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-DRIVES

May I modify the unattended.bat CD letter as follow:

FROM:

set AnswerFile=.\unattend.txt

set SetupFiles=k:\amd64

K:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:lang

TO:

set AnswerFile=.\unattend.txt

set SetupFiles=%CDROM%:\amd64

%CDROM%:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:lang

thanks for your response in advanced.

Perhaps try this in your bat


@Echo Off
CLS
Mode 62, 9
Color F9

Set 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 Confirm

for %%i in (%Char%) do if not exist %%i\SETUP.exe Goto Missing

:Confirm
set CDROM=%%i
set AnswerFile=.\unattend.txt
set SetupFiles=%CDROM%:\amd64

%CDROM%:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:lang

Goto TheEnd

:Missing
set CDROM=Error Unknown Occur
CLS
Echo.
echo %CDROM%
pause
Goto TheEnd

:TheEnd
Exit

  • Author

Perhaps try this in your bat


@Echo Off
CLS
Mode 62, 9
Color F9

Set 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 Confirm

for %%i in (%Char%) do if not exist %%i\SETUP.exe Goto Missing

:Confirm
set CDROM=%%i
set AnswerFile=.\unattend.txt
set SetupFiles=%CDROM%:\amd64

%CDROM%:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:lang

Goto TheEnd

:Missing
set CDROM=Error Unknown Occur
CLS
Echo.
echo %CDROM%
pause
Goto TheEnd

:TheEnd
Exit

Thanks for your response, I'll give it a try.

u can use the following code in your bat file

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

echo off

cls

for /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 as

eg.,

echo Installing Directx 9c

%source%\i386\svcpack\dx.exe

  • 6 months later...

Perhaps try this in your bat


@Echo Off
CLS
Mode 62, 9
Color F9

Set 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 Confirm

for %%i in (%Char%) do if not exist %%i\SETUP.exe Goto Missing

:Confirm
set CDROM=%%i
set AnswerFile=.\unattend.txt
set SetupFiles=%CDROM%:\amd64

%CDROM%:\amd64\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:lang

Goto TheEnd

:Missing
set CDROM=Error Unknown Occur
CLS
Echo.
echo %CDROM%
pause
Goto TheEnd

:TheEnd
Exit

Thanks a lot !!

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.