Black Mesa

Black Mesa

Black Mesa: Blue Shift
Atreidae Jul 29, 2022 @ 1:52am
Fix for Windows 11 gamelink batch file
Hi team, just about to try out the mod and I noticed there are complaints about the Windows 11 installer.

I had a look and TBH it looks like the way "pushd" works on win 11 has changed, for some reason it outputs the path on the pipeline which the cmd interpreter has no idea how to deal with. Couple that with Win11 not starting in the batch files directory and we get this.

I've written a more classic style batch that should help without the use of pushd below. Ideally, PowerShell would be a better solution, but that has its own problems (script execution permissions being one of them!)

This obviously isn't going to work if the user has changed their Steam Install Path, but I feel if we have a user that's doing that. they can figure out how to run "mklink" :)

Hope this helps

====Begin bshift_gamelink.bat====

@echo off
rem We never use %errorlevel%, because it sucks in Windows.

cd "%ProgramFiles(x86)%\steam\steamapps\common\Black Mesa"
if exist bshift (
rmdir bshift
if exist bshift (
echo Could not recreate link - rmdir failed.
echo You can try to delete %cd%\bshift manually.
pause
exit 1
)
echo Old link removed.
)
mklink /J bshift ..\..\workshop\content\362890\2424633574\bshift
if exist bshift (
echo Link created.
pause
) else (
echo Could not link - mklink failed.
pause
exit 1
)
cd .\workshop\content\362890\2424633574\bshift



====End bshift_gamelink.bat====

(edit, fixed an issue with the symlink syntax)
Last edited by Atreidae; Jul 29, 2022 @ 2:21am