Page 1 of 1 1
Topic Options
#2999 - 2000-05-18 04:44 PM clear last user name
Anonymous
Unregistered


I've been working on a simple script to map drives and display a policy message. Now, I would like to add code to remove the last user name from the login box. Can anyone point me in the right direction?

Thanks in advance,

sean

Top
#3000 - 2000-05-18 04:49 PM Re: clear last user name
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX

PSS ID Number: Q114463
Article last modified on 08-11-1999

winnt:3.5,3.51,4.0

winnt

======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Windows NT Workstation versions 3.5, 3.51, 4.0
- Microsoft Windows NT Server versions 3.5, 3.51, 4.0
-------------------------------------------------------------------------------

IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help
topic in Regedt32.exe.

SUMMARY
=======

It is possible to hide the user name of the last logged on user in the logon
dialog box in Windows NT.

MORE INFORMATION
================

WARNING: Using Registry Editor incorrectly can cause serious problems that may
require you to reinstall your operating system. Microsoft cannot guarantee that
problems resulting from the incorrect use of Registry Editor can be solved. Use
Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and
Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete
Information in the Registry" and "Edit Registry Data" Help topics in
Regedt32.exe. Note that you should back up the registry before you edit it. If
you are running Windows NT, you should also update your Emergency Repair Disk
(ERD).

Start Regedt32.exe and locate the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Add a REG_SZ value named DontDisplayLastUserName. Set the data value to 1 to
enable the new feature. A data value of 0 disables the feature.

The Last Username Display can also be hidden without editing the Registry
directly if you have the Windows NT Resource Kit.

1. Click Start\ProgramsResource Kit 4.0

2. Click Configuration\C2 Configuration

3. Double click the line that reads "Last Username Display"

4. Place a check in Hide the last username to login.

5. Click Secure then OK.

Additional query words: prodnt login display

======================================================================
Keywords : kbenv ntconfig NTSrvWkst
Version : winnt:3.5,3.51,4.0
Platform : winnt
=============================================================================
Copyright Microsoft Corporation 1999.




Top
#3001 - 2000-05-19 07:44 AM Re: clear last user name
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
$tab="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
$hide=1 ; 1 will hide the LLOUN while 0 will display it
$ret1=writevalue("$tab","DontDisplayLastUserName","$hide","REG_SZ")
$ret2=readvalue("$tab","DontDisplayLastUserName")
if $ret2="1"
$lloun="suppressed"
else
$lloun="displayed"
endif
? " Last logged on username is " $lloun
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#3002 - 2000-05-19 08:58 AM Re: clear last user name
Anonymous
Unregistered


Thanks, guys, I got it up and running from Bryce's reply, but Radimus, your code is much cleaner than mine.
Now I have a new problem, although it is more of an annoyance. To make this work, I will need to log on as admin once on every machine. Is there a way around this? Am I (probably) missing something obvious?

Sean

Top
#3003 - 2000-05-19 09:22 AM Re: clear last user name
Anonymous
Unregistered


nevermind, I think I found my answer in SU.exe, elsewhere on the board. (note to self, look before posting)

Sean

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.175 seconds in which 0.078 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org