Sign in to follow this  
Followers 0
smood1

Profile Settings Cannot be changed

27 posts in this topic

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?

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites
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.

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites
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

0

Share this post


Link to post
Share on other sites
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"

0

Share this post


Link to post
Share on other sites

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

benjamin

0

Share this post


Link to post
Share on other sites

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"

0

Share this post


Link to post
Share on other sites
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:

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites
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!

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.