Perl Script commands

I have been given a perl script to run via bigfix that will read a database table and create a file if certain conditions are met. I was told run the script using the command below from a command prompt to run it.

c:\perl\bin\perl.exe checkRunStatus.pl

so I just added dos in front of it

dos c:\perl\bin\perl.exe checkRunStatus.pl

It does not appear to be running. Is there a special command that is needed to run a perl script?

Does running “dos c:\perl\bin\perl.exe checkRunStatus.pl” in the fixlet debugger work on one of the target computers?

Generally, we recommend using this format for most commands

waithidden program.exe param1 param2

or the following format, if you need the full environment in the command shell

waithidden cmd.exe /C program.exe param1 param2

I would recommend the 2nd approach for perl to pick up your env variables.

2 Likes

Thanks! I will try that

Unfortunately this did not work. The script did not run. Any other ideas?

I am unable to access the target computers to attempt to run it using the fixlet debugger.

Can you simulate the environment in a virtual machine?

Probably not. Our environment is extremely varied and certain groups control certain machines. But I will try. Thanks for the suggestion.

Another thing you can try before setting up a VM is putting the absolute path of the file

I haven’t used perl but if the command is what it looks like I’m guessing the first parameter is the file path.

Something like the following may work:
waithidden cmd.exe /C c:\perl\bin\perl.exe c:\some\path\checkRunStatus.pl

Thanks. I will try that.

You can also add output redirects to try and capture any error messages that are returned by the command. Then view the results using BigFix Query, custom property, or upload functionality.

Also check the return code it is reporting to see if it is a standard windows error that might make sense, vs something that your perl code might return.

Just to close this out. I never got it to work but we worked around it. Thanks for all the suggestions.