'Activer l'afficahge du compte Administrateur à l'écran d'accueil Windows XP Professionnel
'© Doug Knox - 9/16/2001 - Traduction et diffusion en français: PN (www.d2i.ch/pn)

Option Explicit
On Error Resume Next

'Declare variables
Dim WSHShell, n, p, itemtype, MyBox
Set WSHShell = WScript.CreateObject("WScript.Shell")

'set variables
p = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList\Administrateur"
itemtype = "REG_DWORD"

n = WSHShell.RegRead (p)
errnum = Err.Number

if errnum <> 0 then
'Create the registry key value for Administrator with value 1
	WSHShell.RegWrite p, 1, itemtype
End If

If n = 0 Then
   WshShell.RegWrite p, 1, itemtype
   MyBox = MsgBox("Le compte Administrateur est" & vbCR & "désormais affiché dans l'écran d'accueil", 4096, "Afficher Administrateur")
End If

If n = 1 Then 
   WshShell.Regwrite p, 0, itemtype
   MyBox = MsgBox("Le compte Administrateur est" & vbCR & "désormais caché dans l'écran d'accueil", 4096, "Cacher Administrateur")
End If

Set WshShell = Nothing