iriash Posted April 22, 2021 Share Posted April 22, 2021 Hi, how i can to launch shellexecutewait() to run command /Get-WimInfo /WimFile:\\host_ip\network_unc? Any Idea? Thankx Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 22, 2021 Moderators Share Posted April 22, 2021 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion 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...
seadoggie01 Posted April 22, 2021 Share Posted April 22, 2021 (edited) I personally find it easier to use Run(Wait) instead of ShellExecute(Wait). Once you find the syntax for the command in the command prompt, it's relatively easy to setup ; Setup your command Local $sCmd = "dir /b" ; Run the command (See the helpfile for @Comspec & " /c " note) Local $iPid = Run(@COMSPEC & " /c " & $sCmd, "", @SW_HIDE, $STDERR_MERGED) If @error then Exit ConsoleWrite("Run Error: " & @error & " Extended: " & @extended) ; Wait for the command to finish running ProcessWaitClose($iPid) ; Get the output of the command Local $sOutput = StdoutRead($iPid) Someone recently made a nice function for this... maybe argumentum? I'll edit and post a link if I find it Edit: Found it Edit 2: Nicer link Edited April 22, 2021 by seadoggie01 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
iriash Posted April 22, 2021 Author Share Posted April 22, 2021 Not if it is not the problem of programming it, it is that I do not see the way to execute it directly in powershell to test if it works ... that is the problem Link to comment Share on other sites More sharing options...
Deye Posted April 22, 2021 Share Posted April 22, 2021 its dism /get-wiminfo -Online seadoggie01 1 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