Set args = WScript.Arguments if args.count<>1 then msgbox "db.mdb":wscript.quit Set conn =CreateObject("ADODB.Connection") pwd="密"&chr(13)&chr(9)&chr(10)&"码"&chr(2) connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & args(0)&" ;Mode=Share Deny Read|Share Deny Write;Persist Security Info=False;Jet OLEDB:Database Password="&pwd&";" conn.open connstr conn.execute("ALTER DATABASE Password [123456] ["&pwd&"]") conn.close msgbox "done"
使用方法:保存为*.VBS格式,执行。
本文出自 “我的世界,我就是导演。” 博客,请务必保留此出处http://biock.blog.51cto.com/4643304/1660407
原文地址:http://biock.blog.51cto.com/4643304/1660407