Commandline -WinX -WinY don't work (get overridden)

I’m using 4.16.1 and making a multiplayer game that I need to test via standalone fairly often, so I have a shortcut each for server and client launch, where I attempt to place the windows using commandline e.g.:

UE4Editor.exe “” MainMenu -game -log -windowed -ResX=1280 -ResY=720 -WinX=0 -WinY=30 ConsoleX=0 ConsoleY=0

When the window initially pops up - it is correctly placed where I want it, but after it loads the startup map it centers itself on the screen.

I’ve tried making sure CenterStandaloneWindow=false just in case that was affecting it, but it doesn’t seem to help.

The Console / Log window correctly appears where I position it and does not move.

Any workarounds for this? Messing around with window focus & positioning them manually with the mouse every launch sucks a lot of time out of the day.

Confirm that. Dug around but without any success.

Have the same problem with Launch Profiles or GameUserSettings.ini in UE 4.16.3.
WinX, WinY or for .ini WindowPosX, WindowPosY do not work.
ResX, ResY or for .ini ResolutionSizeX, ResolutionSizeY work.

I have the same problem. A window appears where I want but then immediately jumps to the center of screen. This problem probably comes from
void FSceneViewport::ResizeFrame(uint32 NewWindowSizeX, uint32 NewWindowSizeY, EWindowMode::Type NewWindowMode)
in
Source\Runtime\Engine\Private\Slate\SceneViewport.cpp

Exactly. The wrong window mode comes in. But i didn’t realize why. The issue occurs only in packaged game. The correct window mode, position and size correctly parses from command line but then window mode corrupts on the way. And as consequence the method thinks that new window mode has been set and does center window.

I have just created ‘bug report’ question here:

I’m not sure if this question is marked as a ‘bug report’ so I’ve created new one.

The possibility to specify window location and size is extremely important to me so I had to find some workaround. I’d like to share it. Build the Engine with updated SceneViewport.cpp:

void FSceneViewport::ResizeFrame(uint32 NewWindowSizeX, uint32 NewWindowSizeY, EWindowMode::Type NewWindowMode)
{
	...
	if (NewWindowMode == EWindowMode::Windowed)
	{
		// Replace this block's content with this only string
		NewWindowPos.Reset();
	}
	else
	...
}

This probably will break the windowed full-screen mode. So if you don’t want to lose any other functionality you will have to prepare complete fix or some proper workaround (i.e. reshape a window via Blueprints). As for my situation, I need only windowed mode with custom location/size since I launch multiple game instances simultaneously.

I know this is old but Google brought me here because it still doesn’t work in 4.25. I found that adding a ‘-WINDOWED’ command line parameter is what makes the other parameters work. So to test multiplayer locally I do this for the server:

<fullpath>\UE4Editor.exe <fullpath>\mygame.uproject Minimal_Default?listen -game -ResX=800 -ResY=500 -WinX=0 -WinY=30 -WINDOWED -log

and this for a client:

 <fullpath>\UE4Editor.exe <fullpath>\mygame.uproject 127.0.0.1 -game -ResX=800 -ResY=500 -WinX=850 -WinY=20 -WINDOWED -log

Similarly to dbrueck, I have come across this thread when trying to Google my bug.

My issue was that I was only trying to set WinX and wasn’t putting a WinY value. It seems for WinX to work you need to also define WinY in your command.