John456 Posted October 13, 2006 Share Posted October 13, 2006 For my unattended cd I want user specific registry tweaks such as disabling of the taskmanager. How do I do that? Link to comment Share on other sites More sharing options...
Ctrl-X Posted October 13, 2006 Share Posted October 13, 2006 Import them to HKEY_CURRENT_USER from Cmdlines.txt. Because there aren't any users present at that time, the settings will end up in HKEY_USERS\.DEFAULT, so every newly created user will receive the settings as well. Link to comment Share on other sites More sharing options...
John456 Posted October 13, 2006 Author Share Posted October 13, 2006 But that is not what I want. I'm working on an install cd for a kiosk system. It has several user accounts, each with their own privileges. Some accounts have a replacement Windows shell and restrictions in Windows, others have full access (support account). How would I accomplish this? Can't I edit the registry using RunOnceEx? The accounts are already created at that point.. Link to comment Share on other sites More sharing options...
Ctrl-X Posted October 13, 2006 Share Posted October 13, 2006 I don't think you can do this by editing the registry directly. When one user is logged on, the HKCU hives of the other users aren't available. You could try creating a .reg file for each user and then making each account import their own registry tweaks file, for instance by adding a script to their startup folder (or the AllUsers startup folder), but I'm not sure that will work. Link to comment Share on other sites More sharing options...
John456 Posted October 13, 2006 Author Share Posted October 13, 2006 Isn't it possible to edit the keys in the HKEY_USERS tree? Is it possible to identify which one relates to which account? Link to comment Share on other sites More sharing options...
Ctrl-X Posted October 13, 2006 Share Posted October 13, 2006 Like I said: when one user is logged on, the user hives of the other user accounts aren't available. Just log on, run regedit and open the HKEY_USERS hive: you won't find the other user hives there (except a few default ones, such as S-1-5-18 - Local System, S-1-5-19 - Local Service and S-1-5-20 - Network Service). As you can see users are identified here by their SID, so you wouldn't know the correct SID in advance anyway.You can load another user's hive manually by selecting the HKEY_USERS hive, selecting File / Load Hive and then browsing to the user's NTUSER.DAT file, but AFAIK this can only be done manually. Link to comment Share on other sites More sharing options...
InTheWayBoy Posted October 13, 2006 Share Posted October 13, 2006 Yeah, that's a pretty tricky scenario, one that would benefit from a domain controller hosting the user profiles. but since it sounds like that isn't an option we have to figure out how to get past it.One thought that comes to mind is to install the operating system manually, configure all the profiles as you would like them, and then take the customized user profiles and backup them up. Then you can create an install CD and put those profiles in the $OEM$\$Docs folder. Of course this isn't with out it's own issues, but it sounds like a valid option. Link to comment Share on other sites More sharing options...
mazin Posted October 13, 2006 Share Posted October 13, 2006 I do like what Ctrl-X says.Actually, here's what I do:1- I run this INF from cmdlines.txt, so it goes to each user's CU-RO.As you can see, there's a batch file here: %SystemRoot%\HDCURO\HDCURO.cmd (copied by $OEM$).HDCURO.cmd will run whenever a newly created user logs on for the first time.[Version]Signature = $CHICAGO$[DefaultInstall]AddReg = AddReg.CUROHD[AddReg.CUROHD]HKCU,%CURO%,"Z01",,"%10%\HDCURO\HDCURO.cmd"[sTRINGS]CURO="SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"2- This is the content of HDCURO.cmd:@echo offTitle %UserName% Applications - From HD CURO ----- Started: %TIME%CD %SystemDrive% >NUL:: -----------------------------------------------------------------------------------------IF %USERNAME%=="mazin" GOTO mazinIF %USERNAME%=="LORD" GOTO LORD:mazincolor 4F...MYCOMMANDSGOHERE...ShutDown.exe -f -r -t 60 -c "Your PC will restart in 1 minute..."cls:LORDcolor 1E...MYCOMMANDSGOHERE...REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /d 0 /fShutDown.exe -f -r -t 60 -c "Your PC will restart in 1 minute..."cls Link to comment Share on other sites More sharing options...
Takeshi Posted October 15, 2006 Share Posted October 15, 2006 (edited) ....Deleted.... Edited October 18, 2006 by Takeshi Link to comment Share on other sites More sharing options...
John456 Posted October 16, 2006 Author Share Posted October 16, 2006 (edited) I do like what Ctrl-X says.Actually, here's what I do:...Ok that seems logical. Why do you have the shutdowns in the cmd file?When are the changes executed, before the explorer.exe shell is loaded?Edit:Ok I've tried it using Virtual PC; I got an error the .inf could not be installed. I checked out the MSKB on inf files and I think you forgot quotes around the Signature value. Here is my .inf:[Version]Signature = "$CHICAGO$"[DefaultInstall]AddReg = AddReg.CURO[AddReg.CURO]HKCU,%CURO%,"CURO",,"%10%\Company\regtweaks\CURO.cmd"[STRINGS]CURO="SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"Edit2:It first logs in as the Administrator. Then the .inf is not executed. If I then logoff and login as another user, I see some cmd boxes and get an error stating "INF Install failure. Reason: Access is denied." That account is member of the local group Users, and not Administrators. So that would clarify why it can't add the reg key. But why is the .inf executed at that logon? I thought it would be executed during setup...?This is my cmdlines.txt:[Commands]"rundll32 advpack.dll,LaunchINFSection nLite.inf,U""REGEDIT /s general.reg""HDCURO.inf""RunOnceEx.cmd"Oh and it also seems the general.reg tweaks are not executed...? Edited October 16, 2006 by pkoppelaar Link to comment Share on other sites More sharing options...
mazin Posted October 16, 2006 Share Posted October 16, 2006 The snippets of files I posted are copied from my latest CD. It's WORKING in REAL installations.I don't use a VM to test my CDs! Link to comment Share on other sites More sharing options...
John456 Posted October 18, 2006 Author Share Posted October 18, 2006 It does not work. Could you post your cmdlines.txt? Link to comment Share on other sites More sharing options...
mazin Posted October 18, 2006 Share Posted October 18, 2006 It does not work. Could you post your cmdlines.txt?This is exactly my cmdlines.txt![COMMANDS]"UserAdd.cmd"This is exactly my UserAdd.cmd! What you need is the line in red bold.@echo offTitle Creating A User Account...:: -----------------------------------------------------------------------------------------TUNE 5.9TUNE 4.1TUNE 3.1TUNE 2.1TUNE 1.9:: -----------------------------------------------------------------------------------------echo - cmdlines.txt (T-12) started @ %TIME% on %DATE%.>>%SystemDrive%\TimeLog.txt:: -----------------------------------------------------------------------------------------START /WAIT rundll32 %SystemRoot%\system32\ADVPACK.DLL,LaunchINFSection CDLMROEX.inf,DefaultInstallSTART /WAIT rundll32 %SystemRoot%\system32\ADVPACK.DLL,LaunchINFSection HDCURO.inf,DefaultInstall:: -----------------------------------------------------------------------------------------CD %SystemRoot%\System32 >NULSTART /WAIT %SystemRoot%\System32\CreateUser.exe:: -----------------------------------------------------------------------------------------REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /d 1 /fREG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /d 123 /f:: -----------------------------------------------------------------------------------------net user aspnet /deletenet user HelpAssistant /deletenet user SUPPORT_388945a0 /delete:: -----------------------------------------------------------------------------------------clsI've taken all my pants off! Link to comment Share on other sites More sharing options...
John456 Posted October 19, 2006 Author Share Posted October 19, 2006 (edited) Ok thanks, a bit late though, I already figured out how to install inf files. I use almost the same syntax as you, but without the START /WAIT. What is the difference? (I run it from cmdlines.txt)What questions me is your way of adding users. I use nLite to add users to my install and some of them are normal Users, the XP GUI names them Limited users. If I login on such an acount directly after the installation, I see some cmd windows and then an error stating the Inf could not be installed. I thought that was supposed to happen during setup...?I also got problems writing specific registry keys (UIhost for example) from a Limited account, so I'm switching those accounts to administrator anyway. Edited October 19, 2006 by pkoppelaar Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now