Archive: Rewrite TMP folder from host to removable


Rewrite TMP folder from host to removable
I am currently looking at creating an NSIS script for Blender Portable. This includes the option of installing Python also for use on a USB pen drive.

My query is that Blender, no matter how much I have tried with it's internal settings, writes the rendered animations and other junk files to a TMP folder located on the root of the host PC that it creates itself. I am looking for a way to rewrite the directory to the root of the USB device.

Secondly Blender also opens up an additional window that shows what Blender is doing, checking for Python install, where it is saving files etc. Is there a way to have this hidden or start minimized with something implemented in the script for the launcher.

May not matter but I am currently building on a XP Pro SP3 virtual machine. Blender no longer works in 98 or ME as of 2.46.

Many thanks for any help or advice.


Current Script
Here is the current script that I use.


Console now removed
I have updated the script so that the console window is no longer visible upon running. When I do the app I will provide an alternate script for those whom wish to use the console window.

All I need help with now is writing the script so that if and when it starts to write to the host root TMP folder it redirects to the root of the USB device.

Any help as mentioned previously is welcome.

Thanks.