Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Profile Settings Cannot be changed

- - - - -

  • Please log in to reply
26 replies to this topic

#1
smood1

smood1
  • Member
  • 7 posts
  • Joined 11-December 03
Getting an error message from WIHU when I'm attempting to change profile locations during T-12. Error reads:
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?


How to remove advertisement from MSFN

#2
laderio

laderio

    Newbie

  • Member
  • 37 posts
  • Joined 18-October 04
Why do not change in winnt.sif ?

#3
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04
At T-12 you are always logged on as SYSTEM. Changing any profile specific things like shellfolders, environment variables and so on, wont work at this stage because this account don't own an profile.
Please tell me how you WIHU call and which settings did you make.

Benjamin

#4
my2001

my2001

    Member

  • Member
  • PipPip
  • 260 posts
  • Joined 31-May 04

Getting an error message from WIHU when I'm attempting to change profile locations during T-12.  Error reads:

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:

ALLUSERSPROFILE=C:\Documents and Settings\All Users
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
smood1

smood1
  • Member
  • 7 posts
  • Joined 11-December 03
CMDLINES.TXT entry
[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
smood1

smood1
  • Member
  • 7 posts
  • Joined 11-December 03
nevermind. i'll just set the admin account to login once in Winnt.sif and move the whole thing to a RunOnceEx. Thx

#7
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04

Hhm it is possible to change these settings during T-12 but admittedly I don't do this with WIHU due to several difficulties.


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
my2001

my2001

    Member

  • Member
  • PipPip
  • 260 posts
  • Joined 31-May 04

Hhm it is possible to change these settings during T-12 but admittedly I don't do this with WIHU due to several difficulties.


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
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04
In this case, I think it could be possible to change any profile data. I've to rewrite WIHU a bit.

benjamin

#10
my2001

my2001

    Member

  • Member
  • PipPip
  • 260 posts
  • Joined 31-May 04
just 2 be more precise (& little summary):

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"

#11
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04
(please delete)

Benjamin

#12
my2001

my2001

    Member

  • Member
  • PipPip
  • 260 posts
  • Joined 31-May 04

This means: from then on HKEY_USERS\.DEFAULT hive is no longer connected to the default user's profile

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. :blink:

#13
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04
It seems that every change in this key will not saved back to default profile, don't know why.
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
my2001

my2001

    Member

  • Member
  • PipPip
  • 260 posts
  • Joined 31-May 04

It seems that every change in this key will not saved back to default profile, don't know why.

Yeah, just what I've said before. There's no real connection any more. HKEY_USERS\.DEFAULT key is only used for pre-logon phase after installation. I didn't manage to change settings in this key which later should show up in default user profile. :/


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.

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. :) And if I come across a problem which bothers me, I'll let u no!

#15
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04
But I'll do a little rework next days because there could be some incompatibilities in conjunction with calling WIHU within T-12 stage.
I'll then write detailed information about this in change log.

Benjamin

#16
my2001

my2001

    Member

  • Member
  • PipPip
  • 260 posts
  • Joined 31-May 04
Okay, sure. I'm curious about what those incompatabilities could be.

#17
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04
Problem on T-12 is, that Default User Profile which will be usually found on "%USERPROFILE%\Default User" doesn't exists at this state (as I verified this) or at least is empty. So each user account which will be created on T-12 will get an empty ntuser.dat i.e. it contains no registry key inside. So I found out that HKEY_USERS\.Default could be used because this is also a kind of "Default Profile" which will reside in "%SystemRoot%\System32\Config\default".
So I decided to copy this profile on T-12 instead the default on from %USERPROFILE%.
Im currently testing this version.

Benjamin

#18
my2001

my2001

    Member

  • Member
  • PipPip
  • 260 posts
  • Joined 31-May 04

So each user account which will be created on T-12 will get an empty ntuser.dat


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
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04
Some clarification in german, sorry :(

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

Edited by BenjaminKalytta, 09 November 2004 - 11:55 AM.


#20
my2001

my2001

    Member

  • Member
  • PipPip
  • 260 posts
  • Joined 31-May 04

Nur geht es hier nicht darum das "Default User" Profil zu ändern, sondern um die Möglichkeit die Profile neu erstellter Benutzerkonten zu bearbeiten.


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? :) Oder red' ich hier am Brei vorbei? *lach*

#21
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04
@smood1: Update: This is indeed a little bug, Im currently fixing it.

@my2001: Ja geht um beliebige Benutzerprofile die während T-12 erstellt und initialisiert werden. Eine andere Sache die vielleicht noch erwähnt werden müsste. Die Benutzerkonten werden vor der Softwareinstallation erstellt sodass diese auch nicht von der Tatsache provitieren können das es sich bei T-12 um das Default Profile handelt weil dieses ja vor möglichen Änderungen durch die Softwareinstallationen kopiert werden.

Benjamin Kalytta

Edited by BenjaminKalytta, 09 November 2004 - 03:17 PM.


#22
smood1

smood1
  • Member
  • 7 posts
  • Joined 11-December 03
:thumbup many thanks

#23
victor888

victor888

    Member

  • Member
  • PipPip
  • 155 posts
  • Joined 20-October 04
dizzy with the profound discussions. I don't know German too.

I hope to see the new version.

:w00t:

#24
laderio

laderio

    Newbie

  • Member
  • 37 posts
  • Joined 18-October 04

@smood1: Update: This is indeed a little bug, Im currently fixing it.

@my2001: Ja geht um beliebige Benutzerprofile die während T-12 erstellt und initialisiert werden. Eine andere Sache die vielleicht noch erwähnt werden müsste. Die Benutzerkonten werden vor der Softwareinstallation erstellt sodass diese auch nicht von der Tatsache provitieren können das es sich bei T-12 um das Default Profile handelt weil dieses ja vor möglichen Änderungen durch die Softwareinstallationen kopiert werden.

Benjamin Kalytta

What about a second user-part, where users are created after the software-install? ;)
Or, even better, what about a user-section you can initiate in the software-installation? So you are free to choose the time to start the user-part ^^

#25
BenjaminKalytta

BenjaminKalytta

    Developer

  • Member
  • PipPipPipPip
  • 609 posts
  • Joined 08-June 04

What about a second user-part, where users are created after the software-install?


I think this will make things more complicated. Problem is, each new created user account may be selected as primary account which will be used as default account for software installation.
This implies that the account exists before software installation begins. Or as alternative I could create primary user account ONLY before software installation and each other account AFTER software installation.

@smood1: Update: This is indeed a little bug, Im currently fixing it.

So it is fixed in current build.

Benjamin Kalytta

Edited by BenjaminKalytta, 10 November 2004 - 05:05 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users