Hi,I have found an issue with using PsExec Action in Final Builder 5. If you have a Run Script action that executes some vbscript code before psexec action then the psexec action errors out when running with fbcmd. It’s very easy to replicate, just create a simple project put two actions there:1. Run Script Action (Put some simple vbscript code there)2. PsExec Action: Make it do some simple stuffRun the project with fbcmd.exe and see it fail.
Hi Eugene,
This works fine for me, and there really is no reason why two actions should affect each other in this way. Are you sure you haven’t accidentally slipped some script into the BeforeAction event of the PsExec action?
If you haven’t, could you please send the FinalBuilder project to support@finalbuilder.com for us to have a look at?
Thanks.
- Angus
Hi Eugene,
Thanks for sending the project. I emailed you a fix, but I’m including the reply here for completeness.
***
Thanks for sending the project. I was wrong, the VBScript was messing up the Psexec action!
Due to the way the psexec process buffers output, the Psexec action actually uses your temporary directory to store a temporary file with psexec output.
Your script was inadvertantly overwriting the Temp environment variable with an invalid directory.
Adding the line
dim temp
to the top of the script is sufficient to make it work (this defines Temp as an explicit local variable. Just using a variable called Temp gives you the global TEMP environment variable.)
I’ll modify the Psexec action so it checks first if the TEMP directory exists. However, if you’re using a variable called “temp” in script then I strongly recommend you declare it first with either ‘dim’ (VBScript) or ‘var’ (JScript) to avoid unexpected behaviour.
***