ffdshow Posted September 27, 2013 Share 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 ? Link to comment Share on other sites More sharing options...
water Posted September 27, 2013 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Solution ffdshow Posted September 29, 2013 Author Solution Share 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 Link to comment Share on other sites More sharing options...
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