locked
Where can I find a copy of ShowArgs.exe? RRS feed

  • Question

  • Misplaced mine.  Historically it has been available in Bill Stewart's article about Running Executables,

       https://www.itprotoday.com/powershell/running-executables-powershell

    But now, the download link in the article is missing.

    Friday, April 24, 2020 6:31 PM

Answers

  • Sorry, I misunderstood which arguments it was looking at. It would have helped if the pictures were still on that site. 

    That's a Powershell command that calls WMI to select the current Powershell process using the built-in $PID (process id) and displays the command line which shows the program name and the arguments that it was started with. 

    If I got it right this time.... Use it like this.... Save this script and call it ShowArgs.ps1.

    $cl = (Get-CimInstance Win32_Process -Filter "ProcessId=$PID ").CommandLine
    $pos = $cl.tolower().IndexOf('.ps1')
    "{0}" -f $cl.Substring($pos + 5)
     

    Then in Powershell, replace the .exe with "powershell.exe .\ShowArgs.ps1". (Or the full path to the script." Is the highlighted output what you are looking for? 


    • Edited by MotoX80 Thursday, April 30, 2020 8:40 PM
    • Marked as answer by CBS3 Friday, May 1, 2020 6:27 PM
    Thursday, April 30, 2020 5:35 PM

All replies

  • Hi,

    Are the links you mentioned the ones on the picture?

    If the answer is yes, then I am very sorry to inform you, not because the link is missing, but because the website cannot be opened.

    And believe me, we don’t have that great power to reopen an inaccessible website.

    Maybe you can contact the website author or website editor for help.

    Best wishes,

    Young Yang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, April 27, 2020 1:57 AM
  • Yes.  Thanks for your reply.

    I'll wait a while before marking this answered, in hopes someone may have an alternate link (or a private stash).

    Monday, April 27, 2020 1:54 PM
  • (Get-CimInstance Win32_Process -Filter "ProcessId=$PID ").CommandLine
    

    Monday, April 27, 2020 2:33 PM
  • That is interesting, if a bit cryptic.

    How would I use this?

    Thursday, April 30, 2020 5:07 PM
  • Sorry, I misunderstood which arguments it was looking at. It would have helped if the pictures were still on that site. 

    That's a Powershell command that calls WMI to select the current Powershell process using the built-in $PID (process id) and displays the command line which shows the program name and the arguments that it was started with. 

    If I got it right this time.... Use it like this.... Save this script and call it ShowArgs.ps1.

    $cl = (Get-CimInstance Win32_Process -Filter "ProcessId=$PID ").CommandLine
    $pos = $cl.tolower().IndexOf('.ps1')
    "{0}" -f $cl.Substring($pos + 5)
     

    Then in Powershell, replace the .exe with "powershell.exe .\ShowArgs.ps1". (Or the full path to the script." Is the highlighted output what you are looking for? 


    • Edited by MotoX80 Thursday, April 30, 2020 8:40 PM
    • Marked as answer by CBS3 Friday, May 1, 2020 6:27 PM
    Thursday, April 30, 2020 5:35 PM