CMD.exe /c not working on various systems

Hello Folks,

I am having an issue where cmd.exe /c does not seem to work on some systems. However, on other systems, it is able to take a action statement just find. If I log on locally to the endpoint and perform such command it works just fine. However, if executed through the BigFix console, the command just not launch on the remote endpoint. Here is what I am trying to run against a host and this is exactly what I have inside of my action script:

action uses wow64 redirection false

waithidden cmd.exe /c "C:\Program Files\Tenable\Nessus Agent\nessuscli.exe" agent link --key=KEY_REMOVED --host=abc123.com --port=8834

Any ideas on what the issue could be?

Take a look at the agent log on a failing system. The agent log is located at C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData__Global\Logs

1 Like

There may be a clue in the error line from the BigFix Agent log.

1 Like

See this post / answer that is about this exact same thing, nessus: CMD.exe Double Quote Error

It should work if you do the following:

waithidden cmd.exe /C ""C:\Program Files\Tenable\Nessus Agent\nessuscli.exe" agent link --key=KEY_REMOVED --host=abc123.com --port=8834"

If you check the bigfix client logs when the command was run, you should see what the client is trying to do.

In this case, you likely need the entire command to be wrapped in quotes so that the entire command is processed by CMD properly.

Since you are not redirecting the command output to a file, this might also work:

waithidden "C:\Program Files\Tenable\Nessus Agent\nessuscli.exe" agent link --key=KEY_REMOVED --host=abc123.com --port=8834
2 Likes