V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
GoogleSupport
V2EX  ›  Windows

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

  •  
  •   GoogleSupport · Dec 17, 2015 · 2934 views
    This topic created in 3792 days ago, the information mentioned may be changed or developed.

    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
       Dec 17, 2015
    没有需要吗?
    oott123
        2
    oott123  
       Dec 17, 2015 via Android
    没有。
    chinvo
        3
    chinvo  
       Dec 17, 2015
    没有
    rainy3636
        4
    rainy3636  
       Dec 17, 2015 via Android
    没有⁴
    GoogleSupport
        5
    GoogleSupport  
    OP
       Dec 17, 2015
    这段代码的应用场景是什么?
    dant
        6
    dant  
       Dec 17, 2015 via Android
    这跟用 net 命令和 lusrmgr.msc 里修改是一样的,被修改密码的用户会丢失所有保存的敏感数据(证书、密码等)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2852 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 14:31 · PVG 22:31 · LAX 07:31 · JFK 10:31
    ♥ Do have faith in what you're doing.