ARPFre Posted February 11, 2022 Share Posted February 11, 2022 Good evening everyone, I'm making a script where I fetch WMI information in CMD, where the command line in CMD is: wmic product get name,InstallDate,version > C:\Public\Temp\InstallSoftware.txt However, it takes a while for it to process the information and create the TXT file. Is there a way to appear a "slash" window or another similar window, in MODAL locking until the end of the processing, and then "unlocking"? This warning window should remain open until the end of the command. RunCmd_Modal.au3 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 11, 2022 Moderators Share Posted February 11, 2022 Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states: Quote Share your cool AutoIt scripts, UDFs and applications with others. Do not post general support questions here, instead use the AutoIt Help and Support forums. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Nine Posted February 11, 2022 Share Posted February 11, 2022 For faster result you can scan both registry sections : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall On 64 bit Windows, remember to also check: HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ And/Or you could use a progress bar GUICtrlCreateProgress with style marquee... And/Or you could use Win32_Product (WMI com object) instead of running an outside program (may not be faster, but more fun to script) As you can see there is multiple ways to skin a cat “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Link to comment Share on other sites More sharing options...
ad777 Posted February 11, 2022 Share Posted February 11, 2022 @ARPFre this show splash image until last command in Cmd Appear.: expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <AutoItConstants.au3> Local $sDestination = ".\mslogo.jpg" Global $do_once, $Output, $iPID #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 437, 192, 124) $Group1 = GUICtrlCreateGroup("Test list", 136, 88, 345, 97) $Radio1 = GUICtrlCreateRadio("Run CMD 01", 160, 112, 233, 17) $Radio2 = GUICtrlCreateRadio("Run CMD 02", 160, 144, 273, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlSetState(-1, $GUI_CHECKED) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 If $do_once = "on" Then SplashImageOn("", $sDestination, 250, 100, 10, 10, $DLG_NOTITLE) $do_once = "off" _ROutput() EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radio1 MsgBox(0, GUICtrlGetState($Radio1), "Run CMD 01", 0) Case $Radio2 MsgBox(0, 0, "Run CMD 02", 0) $CMD = @ScriptDir & "\ba.bat" $iPID = Run($CMD, "", @SW_SHOW, $STDOUT_CHILD) $do_once = "on" EndSwitch WEnd Func _ROutput() Do $Output = StdoutRead($iPID) Until StringInStr($Output, "pause") <> 0 ;;if pause was found on Console then ;;;splash off SplashOff() EndFunc ;==>_ROutput Note: ba.bat Contains: start cmd.exe pause iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want. Link to comment Share on other sites More sharing options...
ARPFre Posted February 11, 2022 Author Share Posted February 11, 2022 (edited) @NineHow to use registry keys to be faster? Is it possible to generate a TXT list with this information? Similar to the TXT I attached? InstallSoftware.txt Edited February 11, 2022 by ARPFre Link to comment Share on other sites More sharing options...
Nine Posted February 11, 2022 Share Posted February 11, 2022 Yes, did you even look in regedit ? Did you even try to write a script about it ? If you want me to help you in the future, you better make an effort when I give you a trail of a solution. As I am getting a tad annoyed with your lack of autonomy. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Link to comment Share on other sites More sharing options...
ARPFre Posted February 11, 2022 Author Share Posted February 11, 2022 (edited) @Nine I understand your irritation. I don't want you to write scripts for me to just copy. I ask after trying several alternatives and failing. I used my autonomy for wmic, which got good results. however with your suggestion to be faster I asked the question if it was possible to generate txt through Regedit. I'm learning by myself and using google translator. And also with the tips and scripts that you have published. I don't just copy, I study which commands and which logic was used. Even so, thank you for your availability and attention. I've even tried using PINFO PowerShell And the only one I got was the wmic Edited February 11, 2022 by ARPFre 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