Execute Generic Command Line Program and Show Return value

Forums Desktop Info Execute Generic Command Line Program and Show Return value

This topic contains 7 replies, has 3 voices, and was last updated by Avatar bseale 1 month, 3 weeks ago.

  • Author
    Posts
  • #1609 Reply
    Avatar
    Brueller

    Hello,

    is it possible to run a generic Command Line Program and show its output in Desktop Info??

    0
  • #1612 Reply
    Glenn
    Glenn
    Keymaster

    Not currently.

    What kind of command line program would you want to run?

    0
  • #1653 Reply
    Avatar
    David Read

    I would like to add my voice to this.
    Currently I have a Powershell script that runs regularly to put the wallpaper filename and description into a text file.
    DesktopInfo then displays the text.
    It would be nice if DesktopInfo could run the script, using interval.

    0
    • #1654 Reply
      Glenn
      Glenn
      Keymaster

      I think a CMD item would be able to execute any command line application, including Powershell.exe. It would be able to get the command line error result as an integer which basically shows success or failure.

      Capturing the output may or may not be do-able. Maybe it’s just a case of directing any text output to a text file to be read by a subsequent FILECONTENTS item.

      0
      • #1659 Reply
        Avatar
        David Read

        Thanks Glen.
        Is a CMD item new? I cannot find it in the manual. Pretty sure I have the latest.

        0
        • #1661 Reply
          Glenn
          Glenn
          Keymaster

          Look for it in the next release.

          0
    • #1683 Reply
      Glenn
      Glenn
      Keymaster

      I’ve been experimenting with powershell scripts to see how i would call it and retrieve results. I’d be interested to see your script to see how you create the text result file.

      0
  • #2040 Reply
    Avatar
    bseale
    Participant

    here is a powershell script I use to pull all Microsoft products based on the Publisher value and pull only the DisplayName and DisplayVersion then pipe the output to a text file. Note that the Format is important to ensure that it is clean looking. I use Table

    Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object Publisher -EQ “Microsoft Corporation” | Select-Object DisplayName, DisplayVersion |Format-Table -AutoSize | Out-File -FilePath C:\DesktopInfo1180\Software.txt

    1+
Reply To: Execute Generic Command Line Program and Show Return value
Your information:




Do NOT follow this link or you will be banned from the site!