MSFN Forum: Profile Settings Cannot be changed - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Profile Settings Cannot be changed Rate Topic: -----

#1 User is offline   smood1 

  • Group: Members
  • Posts: 7
  • Joined: 11-December 03

Posted 02 November 2004 - 04:22 PM

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?


#2 User is offline   laderio 

  • Newbie
  • Group: Members
  • Posts: 37
  • Joined: 18-October 04

Posted 02 November 2004 - 05:32 PM

Why do not change in winnt.sif ?

#3 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 03 November 2004 - 01:14 AM

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 User is offline   my2001 

  • Member
  • PipPip
  • Group: Members
  • Posts: 260
  • Joined: 31-May 04

Posted 03 November 2004 - 04:55 AM

smood1, on Nov 2 2004, 11:22 PM, said:

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:

Quote

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 User is offline   smood1 

  • Group: Members
  • Posts: 7
  • Joined: 11-December 03

Posted 03 November 2004 - 10:00 AM

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 User is offline   smood1 

  • Group: Members
  • Posts: 7
  • Joined: 11-December 03

Posted 03 November 2004 - 01:25 PM

nevermind. i'll just set the admin account to login once in Winnt.sif and move the whole thing to a RunOnceEx. Thx

#7 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 03 November 2004 - 03:29 PM

Quote

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 User is offline   my2001 

  • Member
  • PipPip
  • Group: Members
  • Posts: 260
  • Joined: 31-May 04

Posted 03 November 2004 - 04:11 PM

BenjaminKalytta, on Nov 3 2004, 10:29 PM, said:

Quote

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 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 03 November 2004 - 11:48 PM

In this case, I think it could be possible to change any profile data. I've to rewrite WIHU a bit.

benjamin

#10 User is offline   my2001 

  • Member
  • PipPip
  • Group: Members
  • Posts: 260
  • Joined: 31-May 04

Posted 04 November 2004 - 07:56 AM

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 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 04 November 2004 - 09:40 AM

(please delete)

Benjamin

#12 User is offline   my2001 

  • Member
  • PipPip
  • Group: Members
  • Posts: 260
  • Joined: 31-May 04

Posted 04 November 2004 - 10:16 AM

BenjaminKalytta, on Nov 4 2004, 04:40 PM, said:

Quote

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 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 04 November 2004 - 12:02 PM

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 User is offline   my2001 

  • Member
  • PipPip
  • Group: Members
  • Posts: 260
  • Joined: 31-May 04

Posted 04 November 2004 - 05:04 PM

Quote

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


Quote

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 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 08 November 2004 - 11:27 AM

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 User is offline   my2001 

  • Member
  • PipPip
  • Group: Members
  • Posts: 260
  • Joined: 31-May 04

Posted 09 November 2004 - 08:20 AM

Okay, sure. I'm curious about what those incompatabilities could be.

#17 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 09 November 2004 - 09:38 AM

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 User is offline   my2001 

  • Member
  • PipPip
  • Group: Members
  • Posts: 260
  • Joined: 31-May 04

  Posted 09 November 2004 - 10:42 AM

Quote

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 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 09 November 2004 - 11:40 AM

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

This post has been edited by BenjaminKalytta: 09 November 2004 - 11:55 AM


#20 User is offline   my2001 

  • Member
  • PipPip
  • Group: Members
  • Posts: 260
  • Joined: 31-May 04

Posted 09 November 2004 - 12:12 PM

Quote

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*

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy