smood1 Posted November 2, 2004 Posted November 2, 2004 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?
BenjaminKalytta Posted November 3, 2004 Posted November 3, 2004 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
my2001 Posted November 3, 2004 Posted November 3, 2004 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 UsersCommonProgramFiles=C:\Program Files\Common FilesCOMPUTERNAME=NEWXPComSpec=C:\WINDOWS\system32\cmd.exePath=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\WbemPATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WSProgramFiles=C:\Program FilesPROMPT=$P$GSystemDrive=C:SystemRoot=C:\WINDOWSUpgrade=FalseUSERPROFILE=C:\Documents and Settings\Default Userwindir=C:\WINDOWS__PROCESS_HISTORY=C:\WINDOWS\system32\setup.exeIn 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.
smood1 Posted November 3, 2004 Author Posted November 3, 2004 CMDLINES.TXT entry[Commands]"wihu.exe /SkipRestart /INI=install.ini"install.ini...[Users]default=0;Administrator accountuser.0=Administrator;status.0=0x002password.0=123456User.1=LocalUserGroup.1=1Status.1=0x10028Comment.1=Account created by MePersonal.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?
smood1 Posted November 3, 2004 Author Posted November 3, 2004 nevermind. i'll just set the admin account to login once in Winnt.sif and move the whole thing to a RunOnceEx. Thx
BenjaminKalytta Posted November 3, 2004 Posted November 3, 2004 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
my2001 Posted November 3, 2004 Posted November 3, 2004 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"
BenjaminKalytta Posted November 4, 2004 Posted November 4, 2004 In this case, I think it could be possible to change any profile data. I've to rewrite WIHU a bit.benjamin
my2001 Posted November 4, 2004 Posted November 4, 2004 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"
my2001 Posted November 4, 2004 Posted November 4, 2004 This means: from then on HKEY_USERS\.DEFAULT hive is no longer connected to the default user's profileNo 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.
BenjaminKalytta Posted November 4, 2004 Posted November 4, 2004 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
my2001 Posted November 4, 2004 Posted November 4, 2004 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!
BenjaminKalytta Posted November 8, 2004 Posted November 8, 2004 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
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now