RootUser Posted December 25, 2016 Share Posted December 25, 2016 Hello. I created a script that I can use to use a menu for DISM. I found a program called wimlib-imagex that will do some things like dism. I want to show my own progress bar. When I use dism to split a wim file, it does not show a percentage. When I use wimlib-imagex, it shows this: D:\Test>wimlib-imagex split "d:\test\boot.wim" "d:\test\split.swm" 50 --check [WARNING] "d:\test\boot.wim" does not contain integrity information. Skipping integrity check. Writing "d:\test\split.swm" (part 1 of 6): 0 MiB of 258 MiB (0%) written Writing "d:\test\split2.swm" (part 2 of 6): 49 MiB of 258 MiB (19%) written Writing "d:\test\split3.swm" (part 3 of 6): 99 MiB of 258 MiB (38%) written Writing "d:\test\split4.swm" (part 4 of 6): 149 MiB of 258 MiB (57%) written Writing "d:\test\split5.swm" (part 5 of 6): 199 MiB of 258 MiB (76%) written Writing "d:\test\split6.swm" (part 6 of 6): 248 MiB of 258 MiB (96%) written Finished writing split WIM part 6 of 6 Since the percentage is on a new line, how do I modify DISM_ProgressBar function in my script to pick up the percentage. Any help would be appreciated. The wimlib-imagex is for a amd64 computer. DISM GUI Array 1.au3 libwim-15.dll wimlib-imagex.exe Link to comment Share on other sites More sharing options...
careca Posted December 25, 2016 Share Posted December 25, 2016 I'd use a variation of this to grab those values from the console $DSK = Run('cmd', '', @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) Do $Read = StdoutRead($DSK, True, False) $Str = StringInStr($Read, 'Microsoft Windows') Until $Str <> 0 Sleep(300) StdinWrite($DSK, "netsh wlan show profiles" & @CRLF) Do Sleep(100) $Read = StdoutRead($DSK, True, False) $Str1 = StringInStr($Read, 'All User Profile', 0, 2) Until $Str1 <> 0 $Read = StdoutRead($DSK, True, False) Local $Spl = StringSplit($Read, 'All User Profile : ', 1) For $i = 2 To $Spl[0] Local $SplR = StringStripWS($Spl[$i], 7) $Str1 = StringInStr($SplR, @ScriptDir & '>') If $Str1 <> 0 Then $StrL = StringLen(@ScriptDir) $StrTrim = StringTrimRight($SplR, $StrL + 2) GUICtrlCreateListViewItem($StrTrim & '|', $Listview) GUICtrlSendMsg($Listview, $LVM_SETCOLUMNWIDTH, 0, -1) Else GUICtrlCreateListViewItem($SplR & '|', $Listview) GUICtrlSendMsg($Listview, $LVM_SETCOLUMNWIDTH, 0, -1) EndIf Next Nevermind the stringsplits and listview, focus on the StdinWrite and Read. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe 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