V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
GoogleSupport
V2EX  ›  Windows

快速修改 Windows 登录密码,适用 Windows XP、Windows Vita 和 Windows7 系统

  •  
  •   GoogleSupport · 2015-12-17 09:59:57 +08:00 · 2154 次点击
    这是一个创建于 3073 天前的主题,其中的信息可能已经有所发展或是发生改变。

    On Error Resume Next
    REM 保存代码为 ch.vbs ,双击可修改 Windows XP 密码为 administrator 。
    REM 修改密码时,把 SetPassword = "administrator"中的 administrator 修改为预设密码。
    Const SetPassword = "administrator"
    Dim WSNetwork, UserName, Domain
    Set WSNetwork = CreateObject("WScript.Network")
    UserName = WSNetwork.UserName & ",User"
    Set Domain = GetObject( "WinNT://./" & UserName)
    Domain.SetPassword SetPassword
    Domain.SetInfo
    Set WSNetwork = Nothing
    Set WSNetwork = Nothing
    Set WSNetwork = Nothing
    Wscript.Echo "Windows 密码已修改成" & SetPassword

    GoogleSupport
        1
    GoogleSupport  
    OP
       2015-12-17 10:21:11 +08:00
    没有需要吗?
    oott123
        2
    oott123  
       2015-12-17 10:35:34 +08:00 via Android
    没有。
    chinvo
        3
    chinvo  
       2015-12-17 10:36:26 +08:00
    没有
    rainy3636
        4
    rainy3636  
       2015-12-17 11:24:44 +08:00 via Android
    没有⁴
    GoogleSupport
        5
    GoogleSupport  
    OP
       2015-12-17 12:07:11 +08:00
    这段代码的应用场景是什么?
    dant
        6
    dant  
       2015-12-17 12:20:47 +08:00 via Android
    这跟用 net 命令和 lusrmgr.msc 里修改是一样的,被修改密码的用户会丢失所有保存的敏感数据(证书、密码等)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3876 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 10:34 · PVG 18:34 · LAX 03:34 · JFK 06:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.