Created
November 7, 2021 00:37
-
-
Save MechanosG/51eaf95d60e9a63e0a65782c7e31a519 to your computer and use it in GitHub Desktop.
My version of the Godot tracking fix located here - https://steamcommunity.com/sharedfiles/filedetails/?id=1970276543
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Save this as SteamTrackingFix.bat and place it in your Godot folder. | |
:: The name doesn't really matter, but you may need to enable viewing file extensions in Windows to save it as a batch file. | |
:: Run this again if Godot updates and steam tracking stops working. | |
@echo off | |
echo ----- | |
echo Don't forget to add '/K godot.exe' to your Steam Godot Launch Options! | |
echo ----- | |
:: BatchGotAdmin | |
:------------------------------------- | |
REM --> Check for permissions | |
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( | |
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" | |
) ELSE ( | |
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | |
) | |
REM --> If error flag set, we do not have admin. | |
if '%errorlevel%' NEQ '0' ( | |
echo Requesting administrative privileges... | |
goto UACPrompt | |
) else ( goto gotAdmin ) | |
:UACPrompt | |
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" | |
set params= %* | |
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs" | |
"%temp%\getadmin.vbs" | |
del "%temp%\getadmin.vbs" | |
exit /B | |
:gotAdmin | |
pushd "%CD%" | |
CD /D "%~dp0" | |
:-------------------------------------- | |
set godotexe=godot.windows.opt.tools.64.exe | |
set godotbackup=godot.exe | |
dir %godotexe% | find "<SYMLINK>" && ( | |
echo Already fixed. | |
echo ----- | |
goto FIN | |
) | |
if exist %godotbackup% ( | |
echo Old file detected. Godot probably updated. | |
echo Deleting old file.. | |
del %godotbackup% | |
if exist %godotbackup% ( echo -Failed! ) else ( echo -Success ) | |
echo ----- | |
) | |
if exist %godotexe% ( | |
echo Renaming %godotexe% to %godotbackup% | |
ren %godotexe% %godotbackup% | |
if exist %godotbackup% ( echo -Success ) else ( echo -Failed! ) | |
echo ----- | |
echo Creating symlink | |
mklink %godotexe% c:\Windows\System32\cmd.exe | |
echo Done . . . | |
echo ----- | |
) else ( | |
echo Godot exe file not found. Make sure you're in the right folder, or "verify integrity of software files", then retry. | |
echo ----- | |
) | |
:FIN | |
PAUSE |
tysm
Thanks for Fix this problem
Thanks for this 😊 If the command prompt can optionally be hidden, and if it can detect the exe being closed, it will be even better. But for now, it's great 😊
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
:)