thomasakarlsen / TruckersMP-Launcher

Unoffical TruckersMP launcher
MIT License
15 stars 9 forks source link

Can't find/open registry key #9

Closed Bluscream closed 7 years ago

Bluscream commented 7 years ago

Somehow it always returns null image even though the key clearly exists image

thomasakarlsen commented 7 years ago

Your breakpoint is set before the code to grab the key is executed, if you move the breakpoint to the if, then you will see what the readKey value is set to. If the key was empty then the launcher would tell you that your install of truckersMP is missing or invalid and ask you to reinstall using their installer.

If this is refrencing issue #7 then this is not related at all, as it wouldnt crash the client, and even if it did, it would trigger when you first started it, and not when you click the settings button.

Remember that breakpoints happen before the selected code is run ;)

Bluscream commented 7 years ago

image image Still null, and no it's not related to #7 Does it need to have some kind of elevation to read the registry key?

It would be nice to meet you on the TruckersMP TeamSpeak :)

Bluscream commented 7 years ago

Okay so the solution was to compile the project in 64 bit http://stackoverflow.com/questions/2464358/why-is-opensubkey-returning-null-on-my-windows-7-64-bit-system