lowrider2025 Posted March 1, 2024 Posted March 1, 2024 Local $iPID = Run(@ComSpec & ' /c powershell -Command "' & '{Get-NetAdapter | Where-Object InterfaceType -eq 71}' & '"','',@SW_HIDE,6) ProcessWaitClose($iPID) ConsoleWrite(StdoutRead($iPID) & @CRLF) Returns "Get-NetAdapter | Where-Object InterfaceType -eq 71" Is there a way to get the output of the command instead of just the command itself that is being echoed back ? Thanks
Solution Danyfirex Posted March 1, 2024 Solution Posted March 1, 2024 (edited) Hello. Add & to /c powershell -Command "' & ' & {Get-NetAdapter | Where-Object InterfaceType -eq 71}' or Remove { and } Saludos Edited March 1, 2024 by Danyfirex lowrider2025 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
lowrider2025 Posted March 1, 2024 Author Posted March 1, 2024 Sorry didn't help...no output (but dit not echo back the command 🙂).
Danyfirex Posted March 1, 2024 Posted March 1, 2024 are you sure? this works for me: Local $iPID = Run(@ComSpec & ' /c powershell -Command "' & '& {Write-Host "Danyfirex"}' & '"','',@SW_HIDE,6) ProcessWaitClose($iPID) ConsoleWrite(StdoutRead($iPID) & @CRLF) Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
lowrider2025 Posted March 1, 2024 Author Posted March 1, 2024 (edited) Thanks for the help Danyfirex but you changed your reply afterwards...I was replying to your initial answer. The first suggestion of your modified reply works: adding the ampersand. Second one does not. Second one works too ! Edit: must have made a typo somewhere first time around...sorry 😓 Edited March 1, 2024 by lowrider2025 Danyfirex 1
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