Running HWRM from a batch file

I’m running out of room in the Target field of my desktop shortcut, so I decided to try running HWRM from a batch file instead. Here are the contents of the batch file:

"E:\SteamLibrary\steamapps\common\Homeworld\HomeworldRM\Bin\Release\HomeworldRM.exe" -overrideBigFile -luatrace -noMovies -hardwareCursor -w 1600 -h 900 -windowed -ssTGA -datapath "E:\SteamLibrary\steamapps\common\Homeworld\HomeworldRM\DataHWClassicMapsThumbnails" -mpbeta

However, instead of launching HWRM it generates an HwRM.log file on my desktop. Here are the contents of that file:

Wed Mar 11 11:44:16 2015
Version 1.22, Build Number 25, Changelist Number 1015476
UTIL -- filepath failure, failed to create path '..\..\DataWorkshopMODs\'
GAME -- Failed to setup filepath aliases

Any tips on how I can get HWRM to launch properly? Thanks.

Here’s the thing - we’re not even remotely done with how this game runs - what it needs to start, how it understands the things that are pulled down from the Workshop, etc. The Launcher is the tool we use to manage that info - and it can and will change quite a bit more.

So directly running the game isn’t something to document yet aside from the commands that everyone already knows to exist, etc.

Also, ‘-hardwareCursor’ doesn’t do anything anymore.

Does the game create an environmental variable that I can use in place of the lengthy Steam directory?

HomeworldRM (or even classic) expect the exe location to be the working directory. It’s why shortcuts are set to ‘start in’ “Homeworld\HomeworldRM\Bin\Release”.
You are seeing the log file created on the desktop because that’s the current directory in the command prompt (the working directory).

Change your batch file to this:

@echo off
chdir E:\SteamLibrary\steamapps\common\Homeworld\HomeworldRM\Bin\Release\
HomeworldRM.exe -overrideBigFile -luatrace -noMovies -hardwareCursor -w 1600 -h 900 -windowed -ssTGA -datapath E:\SteamLibrary\steamapps\common\Homeworld\HomeworldRM\DataHWClassicMapsThumbnails -mpbeta

You may be able to shorten datapath to just “-datapath DataHWClassicMapsThumbnails”. And quotes are only required around the path if there are spaces in it. In this instance they are not needed.

That worked, thank you.

FYI environmental variables don’t seem to work in program shortcuts.

That’s actually exactly how environmental variables work. The child program inherits the environment variables of the calling one. Shortcuts (.lnk) can’t change env vars but they do pass the existing ones. To say “environmental variables don’t seem to work in program shortcuts” is technically inaccurate.

If you’re starting some program through explorer (Via a shortcut or whatever; including the start menu). That program inherits the environment variable explorer has set.
If you’re changing environment variables you will probably need to log off and on before most executed programs (explorer.exe) see the new variables/changes.

If you open a command prompt and run ‘set’ you will see exactly whit evn vars are set. If you want to create a temporary variable before launching the program use a batch file.

@echo off
set ENV_VAR=path

This will cause the child process to inherit the changed/new variables.

That said, I don’t know what, if any, env vars HWRM supports.