ffdshow Posted September 27, 2013 Posted September 27, 2013 Hello, I want to inject some drivers into boot.wim from two versions of Windows 7 sources. In the script, I want to check if boot.wim is 32-bit or 64-bit. This can be done with a command like this: dism /Get-WimInfo /WimFile:F:Windows7sourcesboot.wim The output looks like this: Deployment Image Servicing and Management tool Version: 6.1.7601.17514 Details for image : F:\Windows7\sources\boot.wim Index : 1 Name : Microsoft Windows PE (x64) Description : Microsoft Windows PE (x64) Size : 1.187.717.206 bytes Index : 2 Name : Microsoft Windows Setup (x64) Description : Microsoft Windows Setup (x64) Size : 1.264.587.270 bytes The operation completed successfully. I guess I should use StdoutRead command, but how ?
water Posted September 27, 2013 Posted September 27, 2013 StdOutRead has an example that shows how to use Run and StdOutRead to do what you need. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Solution ffdshow Posted September 29, 2013 Author Solution Posted September 29, 2013 (edited) #include <Constants.au3> $DOS = Run(@ComSpec & " /c dism /Get-WimInfo /WimFile:F:\Windows 7\sources\boot.wim", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ProcessWaitClose($DOS, 2) $Output = StdoutRead($DOS) If StringInStr($Output, "Microsoft Windows Setup (x86)") Then ; dism command here for injecting 32-bit drivers in a 32-bit boot.wim ElseIf StringInStr($Output, "Microsoft Windows Setup (x64)") Then ; dism command here for injecting 64-bit drivers in a 64-bit boot.wim EndIf Edited September 29, 2013 by ffdshow
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now