PostgreSQL - Unable to write inside TEMP environment variable path [FIX]

02 September, 2020

After a recent fresh windows install I had the "Unable to write inside TEMP environment variable path" error while trying to install PostgreSQL (version 12.4)

And to my surprise the fix wasn't that easy to find... lots of notepad youtube bois 🙄

So... long story short here's how I managed to fix it:

Go to the Registry Editor (hit the win key and type "reg", Registry Editor should pop up right there on the top)

Open up HKEY_CURRENT_USER then SOFTWARE then Microsoft and then near the bottom you should see Windows Script Host, expand it and click on Settings.

reg edit

In my case there was only the (Default), so I created a new REG_DWORD and called it "enabled" (not that it matters, I guess...) and set the value to 1.

Hit OK and proceed with your PostgreSQL installation, everything should work now.

great success