Jump to content

Search the Community

Showing results for tags 'cmdreturn'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. hello, I'm trying to make a check if a process is running on a remote PC. This is what i got this far when I edit a found snippet on this forum. The function _CMDreturn returns the output of the command line command. In this output I want to scan if there is a line whit "process mspaint was not found". This I'm trying to do whit StringLeft. The problem is that I don't get any error's and also don't get a message if it doesn't exist. Could somebody say to me what I'm doing wrong here? Or iff there is a better way to do this? Thanks in advanced. #include <Constants.au3> $result= _CMDreturn('C:\Tools\Ps\pslist.exe mspaint') msgbox(0,"Version",$result) Func _CMDreturn($sCommand) $cmdreturn = "" $stream = Run(@ComSpec & " /c " & $sCommand, @SystemDir, @SW_HIDE, $STDOUT_CHILD + $STDIN_CHILD) While 1 $line = StdoutRead($stream) If @error Then ExitLoop If StringLeft($line, 32) = "process mspaint was not found on" Then msgbox(0,"not found",$line) EndIf $cmdreturn &= $line WEnd Return $cmdreturn EndFunc
×
×
  • Create New...