fortwunty Posted July 16, 2006 Share Posted July 16, 2006 Okay, I know the registry key per-user is HKCU\Environment\Prompt to set the prompt value, but how would I go about actually setting a per-user prompt? I tried this... at T-12, in one of my .cmd files being called, this launches:REG ADD "HKCU\Environment" /v "PROMPT" /t REG_EXPAND_SZ /d "$C%USERNAME%$F$S$P$G" /fFor this sort of output:(username) C:\WINDOWS\system32Now, when I launch that at the T-12 stage, I don't think %USERNAME% is being evaluated at all, because I get () C:\WINDOWS\system32. The users are created in the .cmd file right before this one.Would I be better off setting a global prompt? Or should I add something to RunOnceEx to just force this in there? Link to comment Share on other sites More sharing options...
Sunil Posted July 20, 2006 Share Posted July 20, 2006 I really doubt the install uses an account to do the intial configuration, so it probably would not evaluate the var. Link to comment Share on other sites More sharing options...
Delprat Posted July 20, 2006 Share Posted July 20, 2006 %username% is evaluated once at the moment you launch the command line (and is not written in the registry).If you escape the percents (^%username^%), it will write %username% in the registry, but it will not evaluate it before displaying the prompt.Thus, to get the prompt you expect, you need to set each user's PROMPT var with the real username in. A good way to do that is by running it on the first user logon.++ Link to comment Share on other sites More sharing options...
T D Posted July 20, 2006 Share Posted July 20, 2006 After setting up users, do ithttp://unattended.msfn.org/unattended.xp/view/web/27/If you use net user blahblahblah /add method, in [Guirunonce] of winnt.sif, you can put "%path%\batch.cmd" and of course, in batch.cmd, you have "REG ADD "HKCU\Environment" /v "PROMPT" /t REG_EXPAND_SZ /d "$C%USERNAME%$F$S$P$G" /f"Then it will onyl apply to user blahblahblah.Sorry if this doesn't help, I don't fully understand. Link to comment Share on other sites More sharing options...
fortwunty Posted July 21, 2006 Author Share Posted July 21, 2006 Sorry if this doesn't help, I don't fully understand.This was exactly what I needed... and I had tried something almost exactly like this, but forgot something and it went to hell. Thanks for the help. Only problems I'm having trouble with now is the %USERPROFILE% being recognized from a .cmd called from RunOnceEx. Big thanks though. Link to comment Share on other sites More sharing options...
Innocent Devil Posted July 23, 2006 Share Posted July 23, 2006 (edited) do it from T13 to HKCUafter finalizing install windows make that HKCU as HKU\.DEFAULToops i sorry poting without reading it Edited July 23, 2006 by Innocent Devil 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