Temp folder errors at runtime

I am getting errors when running my FB script. The problem appears to be with creating FB temp files. For example, I have a WinRAR action that errors out in the script when running it from the IDE

FROM A FULL EXECUTION OF THE BUILD SCRIPT…ERROR FROM WINRAR
….Empty header…
a -m3 -idp “C:\CEMLink\BuildResults\6.1.603.0.rar”; @“C:\Windows\system32\1\FBC4D5.tmp”
Executing external process: C:\Program Files\WinRAR\Rar.exe
Starting Directory: C:\Program Files\WinRAR
Parameters: a -m3 -idp “C:\CEMLink\BuildResults\6.1.603.0.rar” @“C:\Windows\system32\1\FBC4D5.tmp”

If I run just the single action from the IDE it works fine. See the build log below…

….Empty header…
a -m3 -idp “C:\CEMLink\BuildResults\0.0.0.0.rar” @“C:\Users\ADMINI~1\AppData\Local\Temp\2\FB6964.tmp”
Executing external process: C:\Program Files\WinRAR\Rar.exe
Starting Directory: C:\Program Files\WinRAR
Parameters: a -m3 -idp “C:\CEMLink\BuildResults\0.0.0.0.rar” @“C:\Users\ADMINI~1\AppData\Local\Temp\2\FB6964.tmp”

Looks very odd, why is it trying to create temp files under c:\windows\system32?

My best guess for this is you have either created an environment variable named temp, or something externally has changed your temp folder.We use the windows api GetTempPath to get the name of the temp file.

I have migrated this script from FB7 to FB8 and running on a new server (Windows Server 2016). It runs fine in FB7 on the old server.

Why would it run differently running a single action versus running the full script?

I have no idea why it is trying to use the System32 folder. I’ve searched my project for System32 and there is no reference to that folder.

Are you able to send your FB8 project file to support @finalbuillder.com so we can take a look. The fact that the behavior changes based on single actions vs project run suggests something in the project is changing the temp path… might be another action doing something iffy, if we see your project file we can take a look at try and figure out the cause.

In case anyone else hits this, change the value of the TEMP Environment variable in your FinalBuilder project is not a good idea, as it affects the return value of some windows api calls.