Control-Alt-Delete from python or command line

后端 未结 6 629
暖寄归人
暖寄归人 2021-01-28 14:13

I\'ve done some research but I would like to be able to call control-alt-delete from python. If that is not possible is it possible to call it from command line because then I c

6条回答
  •  感动是毒
    2021-01-28 14:51

    On reading OP's comments, his/her original need was to change the user's password. In fact, this can be done with:

    from win32com import adsi
    ads_obj = adsi.ADsGetObject("WinNT://localhost/%s,user" % username)
    ads_obj.SetPassword(password)
    

提交回复
热议问题