Mr Reorg Posted August 13, 2006 Share Posted August 13, 2006 When I install my nLited unattended CD and manually partition the HD, I create C: for the OS, D: for Temp files, and E: for Program Files. But at the time of install I can only format C: for the OS. Questions from a newbie:Is there way to unattendedly format the D and E partitions, or can I only do it manually after the installation is completed, via Disk management in Windows?Is there a command I can run from RunOnce in the winnt.sif?Can you please tell this newbie the syntax to use to change the evironment variables so that all users (ie HKLM) are effected/changed in the registry? Link to comment Share on other sites More sharing options...
No6 Posted August 13, 2006 Share Posted August 13, 2006 I use the following in the winnt.sif:[unattended]ProgramFilesDir=\ProgramsCommonProgramFilesDir=\Programs\Common[GuiUnattended]ProfilesDir="%SystemDrive%\Settings"I haven't actually changed the drive but I don't see why you wouldn't be able to. Link to comment Share on other sites More sharing options...
Mr Reorg Posted August 13, 2006 Author Share Posted August 13, 2006 (edited) I have made those entries using nLite, but untill the D partition is formated, windows can't recognize where to install programs (on the D partition, that is). And the Program\Common Files still appears in C instead of D Edited August 13, 2006 by Mr Reorg Link to comment Share on other sites More sharing options...
Takeshi Posted August 14, 2006 Share Posted August 14, 2006 (edited) 1. Yes, use WinPE or BartPE and diskpart. Some people say disk.config in winnt.sif would work but I haven't tried it.This has all been covered before here or in WinPE forum.2. Tell us what you want to do exactly.3. Not sure what you mean or want to do. Edited August 14, 2006 by Takeshi Link to comment Share on other sites More sharing options...
T D Posted August 14, 2006 Share Posted August 14, 2006 DON'T use %systemdrive% it won't work.Not under the [unattended] section. Always use "\...." Like No6 did under [unattended]. Link to comment Share on other sites More sharing options...
blinkdt Posted August 14, 2006 Share Posted August 14, 2006 (edited) If you create the partitions manually, you can format and name them from cmdlines.txt in unattended fashion. My cmdlines.txt looks like this:[COMMANDS]"REGEDIT /S Registry.reg""REGEDIT /S Domain_Blocklist.reg""renuser.exe Administrator Adm1n23""ConfigPartD.cmd""AutoLogon.cmd"The relevant entry is ConfigPartD, where I configure the "D" partition, but you could take this batch file further and adapt it to your needs:@ECHO OFF&SETLOCAL ENABLEEXTENSIONSLABEL C: BootSET DRIVE=D:IF EXIST %DRIVE%\%1 GOTO EOFFORMAT %DRIVE% /FS:NTFS /V:Storage /Q /YSET USF=Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell FoldersSET MYDOC=%DRIVE%\%%USERNAME%%\My DocumentsSET MUSIC=%DRIVE%\%%USERNAME%%\My Documents\My MusicSET PICS=%DRIVE%\%%USERNAME%%\My Documents\My PicturesSET DESKTOP=%DRIVE%\%%USERNAME%%\DesktopSET FAVS=%DRIVE%\%%USERNAME%%\FavoritesREG ADD "HKCU\%USF%" /V "Personal" /T REG_EXPAND_SZ /D "%MYDOC%" /F >NULREG ADD "HKCU\%USF%" /V "My Music" /T REG_EXPAND_SZ /D "%MUSIC%" /F >NULREG ADD "HKCU\%USF%" /V "My Pictures" /T REG_EXPAND_SZ /D "%PICS%" /F >NULREG ADD "HKCU\%USF%" /V "Desktop" /T REG_EXPAND_SZ /D "%DESKTOP%" /F >NULREG ADD "HKCU\%USF%" /V "Favorites" /T REG_EXPAND_SZ /D "%FAVS%" /F >NULMD "%DRIVE%\Acronis True Image Files"ENDLOCAL&GOTO :EOFThe "C" drive is name "boot" and the "D" drive is formatted and named "Storage." Works great. The rest of the batch is about moving directories to "D" and creating directories on "D."Credits to Yzöwl—the batch master—for this one. Edited August 14, 2006 by blinkdt 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