Windows system images automatically add drivers and windows Images

Source: Internet
Author: User

Windows system images automatically add drivers and windows Images

In 2016, I went to a company to do network management, and often worried about installing the system. Later I learned how to automatically deploy WDS, but I found that I started the image boot. no NIC Driver in wim causes wds to report an error. After searching related information on the Internet, I learned how to add a driver to the system to solve the problem that I cannot find the NIC driver during startup. Because each time you encounter a different computer with different NICs, you need to add multiple commands. Therefore, I made a script myself. I am a newbie, so the script is not very well written, so this script is for your reference only. If you have any problems during use, contact me. I can easily improve myself so that everyone can work easily. Thank you.

Suggestion: You can refer to it and hand it by yourself. This helps you understand and learn.

1: START 2 @ if exist "D: \ temp" (rd D: \ temp) 3 @ color 2f 4 @ echo ################################# ####################################### 5 @ echo. 6 @ echo this program is to add the driver to the system, please follow the instructions 7 @ echo. 8 @ echo. 1. This program uses the directory of the system file. The format of the system file is xx. wim 9 @ echo. 10 @ echo. ex: D: \ system \ wim7 \ intsall. wim 11 @ echo. 12 @ echo. 2. This program needs to use the directory of the driver file. The file name is xx. inf 13 @ echo. 14 @ echo. ex: E: \ H3050 \ Lan. realtek \ New \ rt86win7. inf 15 @ echo. 16 @ echo. production date 17 @ echo. 2016.7.21 18 @ echo. 19 @ echo ##################################### ################################## 20 @ echo.21:: set the system image file 22 @ set/p osdir = enter the complete path name of the System File: 23 @ md D: \ temp24 @ cls25 @ echo the system file you selected is "% osdir %" 26 @ pause27: select the system file you selected 28 @ dism/get-wiminfo/winfile: "% osdir %" 29 @ set/p num = Please select your system image index: 30: mount the system image file 31 @ dism/mount-wim/wimfile: "% osdir %"/index: % num %/mountdir: D: \ temp 32: DRIVER33 :: set the driver file 34 @ set/p driverdir = enter the full path name of the driver file: 35 @ dism/image: D: \ temp/add-driver/driver: "% driverdir %" 36: ASK37 @ set/p ask = continue to add the driver file (y/n): 38: Determine whether to continue adding the driver, unmount the System File 39 @ if/I "% ask %" = "y" (goto DRIVER) else if/I "% ask %" = "n" (40 dism/unmount-wim/mountdir: d: \ temp/commit41 goto START 42) else (43 echo "your input is incorrect. Please enter" 44 goto ASK45) 46 @ pause

 

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.