Miguel Sanschez
Miguel Sanschez

Reputation: 11

Running PowerShell Scripts in Komodo Edit

I have a hard time trying to run PowerShell Scripts from the "Run Command" within Komodo Edit on Windows 7.

The command that I am using is:

powershell -File "%F"

When I run it, it does not return anything to the console, it just keeps running till I terminate it.

I have tested it, with the following simple script:

Write-Host "Hello World"

Upvotes: 1

Views: 783

Answers (1)

Emperor XLII
Emperor XLII

Reputation: 13452

This is a known issue where powershell.exe waits for a STDIN prompt to return in certain cases, causing it to hang when no input is provided.

Solutions

  1. Use -InputFormat None to indicate STDIN will not be used:
    powershell.exe -InputFormat None -File "%F"

  2. Forward null input from the outer command scope so that STDIN returns:
    powershell.exe -File "%F" < NUL

Similar Questions

Upvotes: 1

Related Questions