Help - Search - Members - Calendar
Full Version: How to set ALLUSERSPROFILE globally in WinPE?
The CD Forum > The CD Forum > Windows PE
mdjake
Hi,

I would like to change the ALLUSERSPROFILE environment variable in the WinPE stage of the Windows Setup.
SET ALLUSERSPROFILE="C:\Documents and Settings\All Users" from my batch file doesn't seem to work because it doesn't modify ALLUSERSPROFILE globally.
(my ALLUSERSPROFILE points to All Users.WINDOWS initially because I'm doing a parallel windows installation and I would like to change it back to All Users)
Wendy
You set this in a HIVE*.INF file. This is one i use under Windows 2K, the directory names are set to match Vista (one thing vista got right was to shorten the names to allow for scripts to work. Scripts are not partial to spaces! This changes the locations of the profile directory, all users and default users on setup, and should work under Windows PE.

CODE
; HIVESFT.INF

[AddReg]

; hivesft.inf
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","ProfilesDirectory",0x00020002,"%DEFAULT_PROFILES_DIR%"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","AllUsersProfile",0x00000000,"%ALL_USERS%"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","DefaultUserProfile",0x00000000,"%DEFAULT_USER%"

[Strings]
; Shell Folders
DEFAULT_PROFILES_DIR="%SystemDrive%\USERS"
DEFAULT_USER="Default"
ALL_USERS="Public"


Alternately, boot into safe mode or something, and dink these registry entries. You could use tweakui and reboot.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.