Dustinwmew Posted June 13, 2004 Share Posted June 13, 2004 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? Link to comment Share on other sites More sharing options...
sleepnmojo Posted June 13, 2004 Share Posted June 13, 2004 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. Link to comment Share on other sites More sharing options...
Dustinwmew Posted June 13, 2004 Author Share Posted June 13, 2004 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? Link to comment Share on other sites More sharing options...
GreenMachine Posted June 13, 2004 Share Posted June 13, 2004 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 = GE = IF = Dand 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, ... ) Link to comment Share on other sites More sharing options...
scp Posted June 14, 2004 Share Posted June 14, 2004 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 :@echo offecho.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 _errorecho.echo SEL VOL %VOLNUM% >%temp%\drvltr.txtecho REMO >>%temp%\drvltr.txtecho a** LETTER=%2 >>%temp%\drvltr.txtecho EXI >>%temp%\drvltr.txtdiskpart /s %temp%\drvltr.txtdel %temp%\drvltr.txtgoto _end:_errorecho Volume with letter "%1" not found!:_endCreate a file named vollist.txt in $OEM$\$1\install :LIS VOLEXINow you can call this in another batch file with this line:call %systemdrive%\install\swdrvltr.cmd E PThe example line switches from E: to P: Link to comment Share on other sites More sharing options...
Dustinwmew Posted June 14, 2004 Author Share Posted June 14, 2004 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. Link to comment Share on other sites More sharing options...
scp Posted June 14, 2004 Share Posted June 14, 2004 @DustinmwewYes, 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 withdiskpart /s %temp%\drvltr.txtThis is like a batch file for diskpart. The used commands are only shortcuts for the real diskpart commands:SEL = SELECTVOL = VOLUMEREMO = REMOVEa** = ASSIGNetc.It would look like this if it where a already complete TXTSELECT VOL 3REMOVE ASSIGN LETTER=PEXITSELECT selects the found volume with old drive letterREMOVE "unassigns" the old drive letterASSIGN assigns the new drive letterAnd 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]. Link to comment Share on other sites More sharing options...
GreenMachine Posted June 14, 2004 Share Posted June 14, 2004 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. Link to comment Share on other sites More sharing options...
Dustinwmew Posted June 16, 2004 Author Share Posted June 16, 2004 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! 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