Jump to content

How do I put XP on C:, Temp on D:, ProgramFiles on E:?


Recommended Posts

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:

  1. 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?
  2. Is there a command I can run from RunOnce in the winnt.sif?
  3. 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


I use the following in the winnt.sif:

[unattended]

ProgramFilesDir=\Programs

CommonProgramFilesDir=\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

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 by Mr Reorg
Link to comment
Share on other sites

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 by Takeshi
Link to comment
Share on other sites

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 ENABLEEXTENSIONS

LABEL C: Boot

SET DRIVE=D:

IF EXIST %DRIVE%\%1 GOTO EOF

FORMAT %DRIVE% /FS:NTFS /V:Storage /Q /Y

SET USF=Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
SET MYDOC=%DRIVE%\%%USERNAME%%\My Documents
SET MUSIC=%DRIVE%\%%USERNAME%%\My Documents\My Music
SET PICS=%DRIVE%\%%USERNAME%%\My Documents\My Pictures
SET DESKTOP=%DRIVE%\%%USERNAME%%\Desktop
SET FAVS=%DRIVE%\%%USERNAME%%\Favorites

REG ADD "HKCU\%USF%" /V "Personal" /T REG_EXPAND_SZ /D "%MYDOC%" /F >NUL
REG ADD "HKCU\%USF%" /V "My Music" /T REG_EXPAND_SZ /D "%MUSIC%" /F >NUL
REG ADD "HKCU\%USF%" /V "My Pictures" /T REG_EXPAND_SZ /D "%PICS%" /F >NUL
REG ADD "HKCU\%USF%" /V "Desktop" /T REG_EXPAND_SZ /D "%DESKTOP%" /F >NUL
REG ADD "HKCU\%USF%" /V "Favorites" /T REG_EXPAND_SZ /D "%FAVS%" /F >NUL

MD "%DRIVE%\Acronis True Image Files"

ENDLOCAL&GOTO :EOF

The "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 by blinkdt
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...