Error 2: localuser 's profile settings can't be changed. (Profile: C:\Documents....)I have the default user set in the ini, but it appears that it defaults to the SYSTEM account. Is this why? Any ideas?
Profile Settings Cannot be changed
#1
Posted 02 November 2004 - 04:22 PM
#3
Posted 03 November 2004 - 01:14 AM
Please tell me how you WIHU call and which settings did you make.
Benjamin
#4
Posted 03 November 2004 - 04:55 AM
smood1, on Nov 2 2004, 11:22 PM, said:
Error 2: localuser 's profile settings can't be changed. (Profile: C:\Documents....)I have the default user set in the ini, but it appears that it defaults to the SYSTEM account. Is this why? Any ideas?
Hhm it is possible to change these settings during T-12 but admittedly I don't do this with WIHU due to several difficulties. I wrote an own batch file script for my purposes to achieve what I want, it's more or less complicated.
While in T-12 there aren't all environment variables present yet, e.g. %UserName% isn't defined. Here's a list of available env. vars at T-12:
Quote
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=NEWXP
ComSpec=C:\WINDOWS\system32\cmd.exe
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS
ProgramFiles=C:\Program Files
PROMPT=$P$G
SystemDrive=C:
SystemRoot=C:\WINDOWS
Upgrade=False
USERPROFILE=C:\Documents and Settings\Default User
windir=C:\WINDOWS
__PROCESS_HISTORY=C:\WINDOWS\system32\setup.exe
In my batch I definied UserName on my own:
IF NOT DEFINED UserName FOR /F "tokens=3 delims=\" %%d IN ("%UserProfile%") DO SET UserName=%%d
This sets UserName equal "default user" if it's not yet definied during T-12. Maybe u'll need this.
#5
Posted 03 November 2004 - 10:00 AM
[Commands] "wihu.exe /SkipRestart /INI=install.ini"
install.ini
... [Users] default=0 ;Administrator account user.0=Administrator ;status.0=0x002 password.0=123456 User.1=LocalUser Group.1=1 Status.1=0x10028 Comment.1=Account created by Me Personal.1=D:\Userdata ...
Would it be easier/more effective to remove the user info from install.ini and place it into a user.ini and then rerun wihu.exe with a RunOnceEx entry?
#6
Posted 03 November 2004 - 01:25 PM
#7
Posted 03 November 2004 - 03:29 PM
Quote
Hmm, does it mean that you are logged in as SYSTEM but %USERPROFILE%\Default User profile is used at this stage?
If yes, please "smood1" show me the complete path of your log quote Error 2: localuser 's profile settings can't be changed. (Profile: C:\Documents....). The path part is important.
Please show me also your ini file which you used at T-12. Did you create any user account at this stage?
Benjamin
#8
Posted 03 November 2004 - 04:11 PM
BenjaminKalytta, on Nov 3 2004, 10:29 PM, said:
Quote
Hmm, does it mean that you are logged in as SYSTEM but %USERPROFILE%\Default User profile is used at this stage?
You're logged in as "SYSTEM" (this user has got admin privs) and at the same time there's no env. var named "UserName" defined. The only thing you can refer to is the existing variable "UserProfile" ... or you just set "UserName" to "default user", but that makes no difference. I just needed it for my script.
Generally all registry settings during T-12 are aplied to default user's profile so they'll be present in any user account being created _and_ logged on respectively later on, no matter when.
So, yes ... for copying files and stuff %UserProfile% is used, which at T-12 refers to "%SystemDrive%\{ProfilePath}\default user"
#9
Posted 03 November 2004 - 11:48 PM
benjamin
#10
Posted 04 November 2004 - 07:56 AM
registry settings during T-12 phase are imported into HKCU hive which at this point equals/points to HKEY_USERS\.DEFAULT since there is no other user account created yet So: just continue to use HKCU. Even if you create other user accounts/groups during T-12 (for example by using the net command & yes, it IS possible) this won't have (negative) effects. Registry stuff will keep being written into default user's profile during T-12.
Profile data/files are copied into "%SystemDrive%\{profile dir}\default user" folder whose name and place by the way is also stored in %UserProfile% environment variable; %UserName% doesn't exist at T-12 unless you define it on your own, of course.
Later when XP GUI is running in its usual way HKEY_USERS\.DEFAULT settings are loaded and executed when you see the logon screen, i.e. _before_ any user logs on! This means: from then on HKEY_USERS\.DEFAULT hive is no longer connected to the default user's profile! The latter one stores its data now in the accordant folder called "default user" in the profile directory and whenever you create a new user account later on this particular data will be used to create it. And, of course, it'll have all the settings included which you imported to registry/copied to this folder during T-12.
So ...
changing user shell folders for all user accounts can be done by changing just the appropiate default user profile's registry settings during T-12, preferably by altering HKCU hive. And primary key for that is: "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
#12
Posted 04 November 2004 - 10:16 AM
BenjaminKalytta, on Nov 4 2004, 04:40 PM, said:
Quote
No thats not true. HKEY_USERS\.DEFAULT is always pointing to "%Userprofile%Default User\ntusers.dat"
Hhm, strange. I once created some test keys within HKEY_USERS\.DEFAULT and they weren't present in afterwards created user acounts.
#13
Posted 04 November 2004 - 12:02 PM
But this was not my intention with my answer. I've never tested WIHU on T-12 so if some one here encounter any problem (excepted this stated out before) I'll fix this as soon as possible. But I require more feedback.
"Secondary Logon" Service isn't running at this stage, this is certain. With consequence that creating user account at this stage and using some of this as primary user wan't work. But creating user account and setting profile data should work at this stage since I changed my code in release 2.1.x.x as I verifyied this.
Developer, Benjamin Kalytta
#14
Posted 04 November 2004 - 05:04 PM
Quote
Quote
Well, my message hasn't been intended to be a failure report. *hehe* WIHU is doing its job for me quite well, I use it only while in T-12.
#15
Posted 08 November 2004 - 11:27 AM
I'll then write detailed information about this in change log.
Benjamin
#16
Posted 09 November 2004 - 08:20 AM
#17
Posted 09 November 2004 - 09:38 AM
So I decided to copy this profile on T-12 instead the default on from %USERPROFILE%.
Im currently testing this version.
Benjamin
#18
Posted 09 November 2004 - 10:42 AM
Quote
I create user accounts during T-12 using net command. There's absolutely no problem doing that because creating user accounts doesn't at the same time mean that their profile data (i.e. files'n'directories) is created on HDD. This only happens as soon as you _really_ log onto the user account, e.g. using Windows logon screen.
As I wrote somewhere else here in this sub-forum I use a self-made batch file to create my own registry settings for my user shell folders, i.e. not using WIHU-functions for this purpose due to several reasons not important to be mentioned here. Anyway this batch file is called while in T-12 and works flawlessly. As usual (i.e. I use no special way!) I just change the HKCU-keys and later on every user account inherits these settings made in T-12 - no problem occurs.
So, as long as WIHU doesn't need to really log on to another profile as I've described some lines earlier I don't see why you would have to refer to "%SystemRoot%\System32\Config\default" as you have mentioned. I don't have the problem of an empty ntuser.dat; maybe it is empty sometimes, but that's no problem.
And as you already know, too: During T-12 you can't log on to another user account because the needed service isn't started yet by Windows. That's I think the biggest limitation of T-12, I guess most users won't even be affected by this. And the same here: I don't need to log on to another user account for creating my user shell folders. It works just by modifying HKCU-keys.
So ... what's WIHU's problem with user shell folders?
#19
Posted 09 November 2004 - 11:40 AM
Also ich antworte mal erst auf deutsch, wird mir sonst zu kompliziert das zu erklären;)
Das Problem ist folgendes. WIHU ist ja durchaus in der Lage beliebig viele Benutzerkonten zu erstellen, eben auch in der T-12 Phase. Das Problem was hier bei allerdings auftritt ist, sobald man versucht das Profil mit WIHU zu ändern (was ja durchaus Sinn und Zweck ist von WIHU) muss WIHU diese Änderungen zurückschreiben.
Aus dem Grund wird standardmässig auch ein Profil von WIHU für jedes Konto angelegt.
Das Anlegen eines Kontos geht ja wie folgt von statten:
1. Kopieren aller Ordner und Dateien von "%USERPROFILE%\Default User" in den neuen Profilordner
2. Initialisieren des Profils, d.h. anpassen der Sicherheitseinstellungen usw.
Nur habe ich festgestellt, dass das Profil (ntuser.dat) in "%USERPROFILE%\Default User" zu diesem Zeitpunkt noch leer ist, d.h. es befindet sich kein Registrierungsschlüssel in dieser Datei. Dies hatte Fehler verursacht als WIHU darauf zugreifen wollte weil WIHU versucht hat bestimmte Registrierungszweige zu öffnen die noch gar nicht existierten. Deswegen kam es auch zu dieser Fehlermeldung die hier eingangs erwähnt wurde.
Dieses Problem habe ich jetzt damit umgangen, dass ich stattdessen in der T-12 Phase nicht das Profil von "%USERPROFILE%\Default User" verwendet habe, sondern das Standardprofil das immer in HKEY_USERS\.Default (siehe *1) geladen ist.
Klar, wie du schon sagtest, das Erstellen von Benutzerkonten ist ohne Einschränkung möglich. Auch das Schreiben in HKEY_CURRENT_USER dürfte funktionieren (wenn dies denn wirklich in "%USERPROFILE%\Default User" zurückgeschrieben wird).
Nur geht es hier nicht darum das "Default User" Profil zu ändern, sondern um die Möglichkeit die Profile neu erstellter Benutzerkonten zu bearbeiten.
*1. Update: Ich verwende nun doch HKEY_CURRENT_USER statt wie zuvor HKEY_USERS\.DEFAULT
Benjamin Kalytta
This post has been edited by BenjaminKalytta: 09 November 2004 - 11:55 AM
#20
Posted 09 November 2004 - 12:12 PM
Quote
Hhm, ja, ich glaub da liegt Pudels Kern begraben. Meine fast, daß wir wir nicht unbedingt vom vom ganz selben geredet ham. *lach* Nun, etwas schon, natürlich.
Ich ändere durch mein eigenes Skript ausschließlich die Standardbenutzereinstellungen, die dann später natürlich _ohne Ausnahme_ durch _jedes_ Profil mit der tatsächlichen Erstanmeldung verwendet werden. Sprich: Wenn ich festsetze, daß doch bitte alle Anwendungsdaten im Verzeichnis "D:\xyz" landen sollen, dann gilt das schlicht für jedes kommende Profil. Ich glaub, wenn ich die Sache hier richtig verstehe, dreht sich das Problem WIHUs nun darum, daß Du es ja v.a. wg. der %ThisUser%-Variablen erlauben mußt, u.U. auch für jedes Benutzerkonto voneinander abweichende Verzeichnisse für ein- und denselben Benutzerordner (meinetwegen "Anwendungsdaten") anzugeben? Liege ich da richtig mit meiner Vermutung?



Help

Back to top









