从技术上双击可执行文件会发生什么

tl;dr

I'm trying to understand the difference of running a program directly via double clicking the executable vs running it through a terminal or programatically via CreateProcess in windows 10.


long version

Because this is my problem, executing an old game (circa 2003 using D3D8) through double clicking in windows 10 works okay. Executing the game through an seconday executable (also circa 2003) using CreateProcess seems to sometimes work okay.

But executing it through my new golang executable never works. I get a very tiny screen instead. So I want to understand what's the technical difference.

For reference, my golang code goes like: (tiny screen)

cmd := exec.Command(filepath.Join(".", "Game.exe"))
err := cmd.Start()

Disassembling the secondary executable gives me this: (normal screen)

CPU Disasm
Address   Hex dump          Command                                  Comments
004043AF  |.  51            PUSH ECX                                 ; /pProcessInformation = 59C7F521 -> {hProcess=???,hThread=???,ProcessID=???,ThreadID=???}
004043B0  |.  52            PUSH EDX                                 ; |pStartupInfo => OFFSET LOCAL.16
004043B1  |.  68 28E54000   PUSH OFFSET 0040E528                     ; |CurrentDirectory = "."
004043B6  |.  50            PUSH EAX                                 ; |pEnvironment => NULL
004043B7  |.  50            PUSH EAX                                 ; |CreationFlags => 0
004043B8  |.  6A 01         PUSH 1                                   ; |InheritHandles = TRUE
004043BA  |.  50            PUSH EAX                                 ; |pThreadSecurity => NULL
004043BB  |.  50            PUSH EAX                                 ; |pProcessSecurity => NULL
004043BC  |.  68 10E54000   PUSH OFFSET 0040E510                     ; |CommandLine = "Game.exe"
004043C1  |.  50            PUSH EAX                                 ; |ApplicationName => NULL
004043C2  |.  FF15 8CB04000 CALL DWORD PTR DS:[<&KERNEL32.CreateProc ; \KERNEL32.CreateProcessA

When I say the game is a tiny screen it shows up like this:

enter image description here

versus this when it is executed directly with double click: (don't mind it being black its just the normal startup)

enter image description here


Additional info: Actually the problem only exists in windows 10. Windows 7 is completely fine.

For windows 10, the only way to make it normal screen is to use this setting:

enter image description here

When that is used, I get the normal screen when using double click or the secondary executable. But its still a tiny screen on my Golang app.