On Error Resume Next Set aArgs=WScript.Arguments if aArgs.Count=0 Then MsgBox "请运行 DevBackup.Cmd 开始备份驱动! ",64,"BY: fastslz":Wscript.Quit Set Fso = CreateObject("Scripting.FileSystemObject") Set aNet = CreateObject("Wscript.Network") strComputer = aNet.ComputerName:aUser = aNet.UserName:aErr = "0" Set aGroup = GetObject("WinNT://" & strComputer & "/Administrators") For Each aUsers in aGroup.Members If aUsers.Name = aUser Then aErr= "1" Next Set WMI = GetObject("winmgmts://" & strComputer & "/root/cimv2") Set aItems = WMI.ExecQuery("Select * from Win32_PnPSignedDriver") If aErr = 0 Then MsgBox "本程序必须以系统管理员身份运行 ",4160,"提示":Wscript.Echo "1":Wscript.Quit if aItems.Count=0 Then MsgBox "WMI 组件运行库出错,WinXP精简版Win2000系统会出现此状况 ",4160,"提示":Wscript.Echo "2":Wscript.Quit Path = Left(Wscript.ScriptFullName,Len(Wscript.ScriptFullName)-Len(Wscript.ScriptName)) BakPath = Path&"Drivers/" If Fso.FolderExists(BakPath)=False Then Fso.CreateFolder(BakPath)