In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article is about how vbs automatically installs drivers. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
In fact, it's very simple, just register the folder where the inf files of these drivers are located in the registry.
For example:
After we separate the drivers on our computers from the system through software such as driver sprites, if we want to install these drivers automatically the next time we install the system. We can write the folder corresponding to these separated drivers into the registry, and then restart the computer, which will automatically search for hardware and install drivers. Isn't that cool? Here I use winrar+vbs to implement.
For example, we now have the following folders for drivers and their inf files:
Motherboard-maincard
Display card-vga
Sound card-sound
Compress the maincard, vga, sound folders together into an executable file, and set the interface-free / self-extracting path to c:\ device
The compressed file is named d.exe and then the vbs script device.vbs is edited as follows
ON ERROR RESUME NEXT
SET OS=CreateObject ("wscript.shell")
Set filesystem=CreateObject ("scripting.filesystemobject")
Pathy=filesystem.GetFile (WScript.scriptFullName). ParentFolder
Path2= "c:\ drivers\"
Yn=msgbox ("- >" & chr (10) & _
Path2,1, "release driver")
If yn=2 then wscript.quit
Device1=os.regread ("HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ DevicePath")
Device2= _
Path2& "and" & _
";" & path2& "maincard" & _
";" & path2& "sound" & _
";" & path2& "vga" & _
";" device1
Os.regwrite "HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ DevicePath", device2
Os.run pathy & "\ d.exe / s", 1JI true
Msgbox "driver has been released, please refresh the hardware list or restart your computer in device Manager!"
Thank you for reading! This is the end of the article on "how to automatically install drivers in vbs". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
Css3 fillet style in the custom button style, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something. The code is as follows:
Wechat
About us
Contact us
Product review
car news
thenatureplanet
More Form oMedia:
AutoTimes.
Bestcoffee.
SL News.
Jarebook.
Coffee Hunters.
Sundaily.
Modezone.
NNB.
Coffee.
Game News.
FrontStreet.
GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.