I need to be able to make setup look at a drive and letter it the way I wont.
I have the letters set now but when setup starts it orgs all the drives the way it wonts.
(I have 7 partisons of drives)(C Windows: D Data: E A^2: F Free: H Han: P: Programs S Swap:)
(2 CD's)(K: L:)
(1 USB pin drive)(it sees the USB)(I:)
I have setings in the setup to install programs on P:, Swap file on S:, and the users on D:, but the setup sees the drives as:
Harddrive's C: D: E: F: G: H: I:
CD's J: K:
and USB's L:
is there a way for the setup to see the way I wont it?
Page 1 of 1
set drive letter for setup
#2
Posted 13 June 2004 - 12:09 PM
You can run the subst command as a temporary fix till you change it. Not sure about having it see it the way you want, but there probably is a way.
#3
Posted 13 June 2004 - 02:45 PM
so, you say that I till it at setup that so and so drive is also so and so, then when I get into widnow I del the 1st drive ref for the drive?
does anyone known if that will work?
does anyone known if that will work?
#4
Posted 13 June 2004 - 04:54 PM
In theory, it's fine. The SUBST command disappear next boot. however, it wont work for you, as you will need to do something similar to:
D = G
E = I
F = D
and you have a connflict.
Windows defines those letters in a fixed, standard manner. I play with partition placement, and hiding until setup is completed. I do rename the CDs, and use the SUBST commnd to hold over till the reboot, but the letters I use are always available in my boxes (K, L, ... )
D = G
E = I
F = D
and you have a connflict.
Windows defines those letters in a fixed, standard manner. I play with partition placement, and hiding until setup is completed. I do rename the CDs, and use the SUBST commnd to hold over till the reboot, but the letters I use are always available in my boxes (K, L, ... )
#5
Posted 13 June 2004 - 07:23 PM
But... you can change the drive letter with software like Partition Magic, so it may be possible to change it with a commandline tool, maybe diskpart.
Here ist the way it works, but you even cannot do a cross change like above and it needs reboot to get active:
Create a file named swdrvltr.cmd in $OEM$\$1\install :
Create a file named vollist.txt in $OEM$\$1\install :
Now you can call this in another batch file with this line:
call %systemdrive%\install\swdrvltr.cmd E P
The example line switches from E: to P:
Here ist the way it works, but you even cannot do a cross change like above and it needs reboot to get active:
Create a file named swdrvltr.cmd in $OEM$\$1\install :
@echo off
echo.
echo Searching for old drive letter...
SET VOLNUM=
FOR /F "tokens=1-3" %%A IN ('diskpart /s %~dp0vollist.txt') DO (
If "%%~A"=="Volume" If "%%~C"=="%1" echo %%~C found as Volume %%~B
If "%%~A"=="Volume" If "%%~C"=="%1" SET VOLNUM=%%~B
)
)
If "%VOLNUM%"=="" goto _error
echo.
echo SEL VOL %VOLNUM% >%temp%\drvltr.txt
echo REMO >>%temp%\drvltr.txt
echo a** LETTER=%2 >>%temp%\drvltr.txt
echo EXI >>%temp%\drvltr.txt
diskpart /s %temp%\drvltr.txt
del %temp%\drvltr.txt
goto _end
:_error
echo Volume with letter "%1" not found!
:_end
Create a file named vollist.txt in $OEM$\$1\install :
LIS VOL EXI
Now you can call this in another batch file with this line:
call %systemdrive%\install\swdrvltr.cmd E P
The example line switches from E: to P:
#6
Posted 14 June 2004 - 10:26 AM
I am haveing a hard time understanding that. I know some Java so I know that it is looking at the 3 char's one the 1st letter, 2nd a " ", and 3rd the 2nd drive letter. and you are saying to do a test on all 3, you are looking at all letters and see if there is a Volume for that letter then test if it is the 1st letter, I think.
then you are doing something to swich the 1st to the 2nd, but I don't understand the way it works. am I right on all that?
would this work becouse it would need to be done before windows puts any programs into the programs folder?
I could maybe put a file into ever Drive named "Drive#.txt" and in the unattend.inf file have a [string] that test for the file, so it would put the programs into the right drive, but I would still need to chage anything in teh reg that does not use the %ProgramFiles% to refure to something in the program folder...I hate the ones that do that.
then you are doing something to swich the 1st to the 2nd, but I don't understand the way it works. am I right on all that?
would this work becouse it would need to be done before windows puts any programs into the programs folder?
I could maybe put a file into ever Drive named "Drive#.txt" and in the unattend.inf file have a [string] that test for the file, so it would put the programs into the right drive, but I would still need to chage anything in teh reg that does not use the %ProgramFiles% to refure to something in the program folder...I hate the ones that do that.
#7
Posted 14 June 2004 - 11:45 AM
@Dustinmwew
Yes, you are right with your description.
The next part you don't understand, is, that the batch file creates a silent command file for diskpart named drvltr.txt and runs it with
diskpart /s %temp%\drvltr.txt
This is like a batch file for diskpart. The used commands are only shortcuts for the real diskpart commands:
SEL = SELECT
VOL = VOLUME
REMO = REMOVE
a** = ASSIGN
etc.
It would look like this if it where a already complete TXT
SELECT VOL 3
REMOVE
ASSIGN LETTER=P
EXIT
SELECT selects the found volume with old drive letter
REMOVE "unassigns" the old drive letter
ASSIGN assigns the new drive letter
And the way how to install the programs is an experemiment. It should be possible to assign the drive letters in CMDLINES.TXT and install the software in [GUIRunOnce]. If thias method works, you dont have to change the registry entries, because after the CMDLINES.TXT is done and setup reboots, all letters are reassigned BEFORE the software(s) get installed out of [GUIRunOnce].
Yes, you are right with your description.
The next part you don't understand, is, that the batch file creates a silent command file for diskpart named drvltr.txt and runs it with
diskpart /s %temp%\drvltr.txt
This is like a batch file for diskpart. The used commands are only shortcuts for the real diskpart commands:
SEL = SELECT
VOL = VOLUME
REMO = REMOVE
a** = ASSIGN
etc.
It would look like this if it where a already complete TXT
SELECT VOL 3
REMOVE
ASSIGN LETTER=P
EXIT
SELECT selects the found volume with old drive letter
REMOVE "unassigns" the old drive letter
ASSIGN assigns the new drive letter
And the way how to install the programs is an experemiment. It should be possible to assign the drive letters in CMDLINES.TXT and install the software in [GUIRunOnce]. If thias method works, you dont have to change the registry entries, because after the CMDLINES.TXT is done and setup reboots, all letters are reassigned BEFORE the software(s) get installed out of [GUIRunOnce].
#8
Posted 14 June 2004 - 04:08 PM
To clarify my example ...
CD is originally D, you change it to K:, with an alias poining to D:, so that setup can find the files to continue. Data was originally E:, you change it to D:, with (or without) an alias to E:.
So ... does D: point to the alias of K:, the CD, or the DATA disk D: ?
Changing driver letters fron the command line is tit, but avoiding the conflicts is not.
CD is originally D, you change it to K:, with an alias poining to D:, so that setup can find the files to continue. Data was originally E:, you change it to D:, with (or without) an alias to E:.
So ... does D: point to the alias of K:, the CD, or the DATA disk D: ?
Changing driver letters fron the command line is tit, but avoiding the conflicts is not.
#9
Posted 16 June 2004 - 08:27 AM
now I need to be able to find wich drives are named what in setup, and I will do the higher drives 1st (ex. P S) so not to have a confilt when I run this program. (I don't wont 2 drives with the same letter...)
to do that all I have to do it run the command for the later ones 1st.
thinks!
to do that all I have to do it run the command for the later ones 1st.
thinks!
Share this topic:
Page 1 of 1



Help

Back to top








