Y8论坛-舟山东路论坛

标题: 登录是否显示超级管理员 [打印本页]

作者: 问君    时间: 2008-3-13 15:06
标题: 登录是否显示超级管理员
Dim WSHShell, n, MyBox, p, p1, t, cn, Caption, itemtype, errnum
Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList\Administrator"
itemtype = "REG_DWORD"
t= "Choose Accordingly"

On Error Resume Next
n = ws.RegRead(p)
errnum = Err.Number
If errnum <> 0 then  
n = 0
End If
Caption = "1 = Show Administrator on Destop, 0 = Don't Show Administrator on Desktop"
On Error Goto 0
cn = InputBox(Caption, t, n)
If cn <> "" Then
WSHShell.RegWrite p, cn, itemtype
End If
If cn <>"" Then
MyBox = MsgBox("You must Log Off/Log On for the changes to take effect.", vbOKOnly,"Done")
End If


VBS代码
作者: 想你的自由    时间: 2008-3-13 18:15
哈哈...VBS没玩过...ASP的话还是没问题的...哈哈




欢迎光临 Y8论坛-舟山东路论坛 (https://y8bbs.com/) Powered by Discuz! X3.2