• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Studio deletes system TEMP folder after run of Windows target

C

CuG

Guest
New behavior from standalone Studio after upgrading to 1.4.1763 (from 1.4.1757).

When I run a Windows-target game in Studio, when the game exits, the folder pointed to by Windows system environment variable %TEMP% is deleted!

The same thing happens when I use the Steam 1.4.1763 version. Only happens with the Windows target.

For the time being I get around this issue by running studio from a .BAT file which points %TEMP% and %TMP% at a temporary folder, then it opens the Studio help file to lock the temp folder from deletion (because the help file creates two lock files in the folder), and then it runs Studio.

REM *****
REM .bat file to start studio
REM *****
set TEMP=C:\0-dev\temp\dummytemp
set TMP=C:\0-dev\temp\dummytemp
start C:\Users\[USERNAME]\AppData\Roaming\GameMaker-Studio\5pice.chm
start C:\Users\[USERNAME]\AppData\Roaming\GameMaker-Studio\GameMaker-Studio.exe​

________________
Vista SP2 64-bit
 
C

CuG

Guest
Just spent more than an hour uninstalling, deleting all GM, yoyogames and related directories and register entries. Then did a clean reinstall of GM Studio Pro 1.4.1763.

And the delete-system-temp-directory (%TEMP%) behavior remains, when I run a Windows or Windows (YYC) target (so maybe it's not the Runner.exe but Studio itself deleting the directory after running a Windows target?)

More info:

When GMStudio is run a "scoped_dir3576_13857" directory is created in the system TEMP folder.

This "scoped_dir3576_13857" directory is then deleted, along with any other content of the system TEMP directory (and the TEMP directory itself if no files from another application lock it) after running a Windows/Windows YYC target from Studio.

A symptom of the problem is being unable to open the GM Help file after running a game through studio but the Help will open if you open it first thing on running GMStudio.
 
Last edited by a moderator:
I had this problem as well on 1.4.1763. I also tested it on EA build 1.99.548 and it was still there.

Your analysis was sound and you figured out the problem really well.
Your bat file didn't fix it for me.
But I still used what you said and made it work by doing:
1. Create "Lock.txt" file in C:\Users\[USERNAME]\AppData\Local\Temp folder
2. Open "Lock.txt"
3. Compile game using YYC without errors.

I created a bat file for it here:

Code:
@echo off

REM Check for Temp folder. If it does not exist, create it.
if exist %TEMP% (
echo "Temp folder already exists"
) else (
echo "Temp folder does not exist"
mkdir %TEMP%
echo "Temp folder created"
)

REM Check for Lock.txt file. If it does not exist, create it.
if exist %TEMP%\Lock.txt (
echo "Lock.txt already exists"
) else (
echo "Lock.txt does not exist"
copy /y NUL %Temp%\Lock.txt >NUL
echo "Lock.txt file created"
)

REM Open Lock.txt file
start /MIN notepad.exe "%Temp%\Lock.txt"
echo "Lock.txt file opened"

echo "Batch File Completed"
pause
Having the text file in Temp folder opened makes GMS not delete the Temp folder.

Thank you again so much for figuring it all out for us.
 
Last edited:
Top