Posted May 20, 2022
Use a program such as Advanced Run by NirSoft.
In the Advanced Run window:
Add the GOG installer to the "Program to Run:" field.
Set "Run As…" to "Administrator (Force UAC Elevation)" in the dropdown menu. (Advanced Run doesn't have to be run as admin to do this.)
In the "Environment Variables" section, in the dropdown menu, select "Use only the following environment variables (ignore the system variables)"
Click the "Fill Current Environment Strings" button to the right of the dropdown menu. This will fill the text box with variables.
Find "TMP=" and "TEMP=" and change the path on the right of the equals sign to a TEMP folder of your choice. ("D:\TEMP","X:\TEMP", "Path-to-game\TEMP", etc.)
Click Run in the bottom right of the window, the installer should run and use the TEMP folder you specified instead of what you have set.
You'll have to do this for every problematic program/installer, but it's better than having to change the system variable every time you install a game, restarting, installing, resetting the temp variables, and restarting again, like it was the 1990's again.
Personally, I have my %TEMP% and %TMP% set to "R:\temp". R: is my RAM disk and though it's only 8GiBs, it's very rare that I have problems because of it's size. Most software that could overuse it have settings to customize the temporary files location for it to use.
Edit:
Added link: https://www.nirsoft.net/utils/advanced_run.html
In the Advanced Run window:
Add the GOG installer to the "Program to Run:" field.
Set "Run As…" to "Administrator (Force UAC Elevation)" in the dropdown menu. (Advanced Run doesn't have to be run as admin to do this.)
In the "Environment Variables" section, in the dropdown menu, select "Use only the following environment variables (ignore the system variables)"
Click the "Fill Current Environment Strings" button to the right of the dropdown menu. This will fill the text box with variables.
Find "TMP=" and "TEMP=" and change the path on the right of the equals sign to a TEMP folder of your choice. ("D:\TEMP","X:\TEMP", "Path-to-game\TEMP", etc.)
Click Run in the bottom right of the window, the installer should run and use the TEMP folder you specified instead of what you have set.
You'll have to do this for every problematic program/installer, but it's better than having to change the system variable every time you install a game, restarting, installing, resetting the temp variables, and restarting again, like it was the 1990's again.
Personally, I have my %TEMP% and %TMP% set to "R:\temp". R: is my RAM disk and though it's only 8GiBs, it's very rare that I have problems because of it's size. Most software that could overuse it have settings to customize the temporary files location for it to use.
Edit:
Added link: https://www.nirsoft.net/utils/advanced_run.html
Post edited May 21, 2022 by naarcissus