Execute Generic Command Line Program and Show Return value

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

Viewing 3 reply threads
  • Author
    Posts
    • #1609 Reply
      AvatarBrueller

      Hello,

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

      0
    • #1612 Reply
      GlennGlenn
      Keymaster

      Not currently.

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

      0
    • #1653 Reply
      AvatarDavid 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
        GlennGlenn
        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
          AvatarDavid Read

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

          0
          • #1661 Reply
            GlennGlenn
            Keymaster

            Look for it in the next release.

            0
      • #1683 Reply
        GlennGlenn
        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
      Avatarbseale
      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+
Viewing 3 reply threads
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!