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" /f
For this sort of output:
(username) C:\WINDOWS\system32
Now, 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?
Page 1 of 1
custom CMD Prompt (through registry)
#2
Posted 19 July 2006 - 06:54 PM
I really doubt the install uses an account to do the intial configuration, so it probably would not evaluate the var.
#3
Posted 20 July 2006 - 01:15 AM
%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.
++
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.
++
#4
Posted 20 July 2006 - 12:44 PM
After setting up users, do it
http://unattended.ms...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.
http://unattended.ms...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.
#5
Posted 21 July 2006 - 04:40 PM
Quote
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.
#6
Posted 23 July 2006 - 01:07 AM
do it from T13 to HKCU
after finalizing install windows make that HKCU as HKU\.DEFAULT
oops i sorry
poting without reading it
after finalizing install windows make that HKCU as HKU\.DEFAULT
oops i sorry
poting without reading it
This post has been edited by Innocent Devil: 23 July 2006 - 01:23 AM
- ← can you defini logonui.exe destination within .theme file?
- Customizing Windows
- Change Autorun behaviour for USB Drives →
Share this topic:
Page 1 of 1



Help
Back to top









