Pure Script Backup _ Restore driver enhanced version with related Sleep.exe_dos/bat

Source: Internet
Author: User
Tags chr
Description
This script cannot be said to be more perfect than the drive wizard, but it does make up for the lack of a driver!
This version is enhanced by my previous version (with the help of DevCon pure script backup) and is already the perfect version.

1, support the full WHQL digital signature (I do not support the Driver Wizard 2005 Professional Edition).
2, intelligent judge the system has installed the driver, and only backup users to install the driver, if the device contains WHQL digital signature is printed information.
3, support the driver file packaging storage, double-click a single device name named. EXE self-extracting method to restore drive, restore drive is so easy.
4, Support Ning Silent Way Plug-in installation update drive, convenient system integration, ghost user calls.
5, the Compatible Driver wizard has backed up the project, that is to say, run the script to restore the Drive wizard once back up the project.
The Restore method puts Devupdate.cmd Tools in the wizard's backup driver file directory and runs Devupdate.cmd
6, the source code in the open did not make any encryption, as long as you have a little understanding of the script completely modify to achieve their own needs! Don't reinvent yourself;-
  
  
Supplementary Note:
EXE self-extracting and restoring drive Auto Answer parameter-y: "D:\Dev\NVIDIA GeForce4 mx mx 400.exe"-y
Packaged integrated nvidia GeForce4 MX 400.exe is limited to restoring updates on this computer, and I don't guarantee that it will work on all Nvidia GeForce4 series graphics because the hardware IDs for each machine are not exactly the same.
This version is not supported win2000,win2000 users can consider using a previous version to back up, Vista I did not test conditions, so ...
Okay, I'm not sticking it. N Multi-text description, a word backup and restore drive simple and simple, rookie, Master are applicable ^_^

Subroutine description
Devcon.exe Microsoft instead of Device Manager command line utility
Devcon_64.exe Microsoft instead of Device Manager command line utility
Sleep.exe for batch suspend or wait for user to press a key
Update.cmd Update device driver code
DEV.SFX is used to make an integrated drive self-extracting module
7za.exe i Chinese 7-zip command line standalone compression tool (this version relies on DLL library)

Any suggestions and comments and bug submissions Welcome to the following address
[Original] With the help of DevCon pure script backup driver

Dev.vbs
Copy Code code as follows:

On Error Resume Next
Set aargs=wscript.arguments
If aargs.count=0 Then MsgBox "Please run Devbackup.cmd start Backup drive!" "," 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 "This program must be run as a system administrator", 4160, "Prompt": WScript.Echo "1": Wscript.Quit
If aitems.count=0 Then MsgBox "WMI component runtime error, WinXP this condition in the compact version Win2000 system", 4160, "Prompt": 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)

For each aitem in Aitems
If Instr (AITEM.INFNAME,CHR) &CHR (&CHR (109)) > 0 Then
Devname = Replace (Aitem.devicename, "/", "")
Devname = Replace (devname, "\", "")
Devname = Replace (Devname, "*", "")
Devname = Replace (Devname, "?", "")
Devname = Replace (devname, "|", "")
Devname = Replace (Devname, ">", "")
Devname = Replace (Devname, "<", "")
If fso.folderexists (bakpath&devname) =false Then fso.createfolder (bakpath&devname)
Set nfofile = Fso.opentextfile (Bakpath & devname & "\driver.nfo", 2,true)
Nfofile.writeline "Devicename=" & Aitem.devicename
Nfofile.writeline "hardwareid=" & Aitem.hardwareid
Nfofile.writeline "Infname=" & Aitem.infname
Nfofile.close
WScript.Echo Aitem.devicename & "N" & Aitem.hardwareid & "N" _
& Bakpath&devname & "n" & Aitem.infname
End If
Next

Dev2008-7-4.rar
Latest Version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.