Game does not start - "Could not determine application directory" message

Post bug reports and ask for support here.
Post Reply
Andriych
Posts: 26
Joined: Sat Nov 26, 2016 8:15 pm

Game does not start - "Could not determine application directory" message

Post by Andriych »

Hi,

Just purchased this game on Steam and being an old fan of it - that's the first of the series I have issue with.
It doesn't start with the message in subj.
I have seen a similar post already here.
Same error message if I try to run it both from Steam and from CCE exe directly. So it's not about those two files being wrong, it's the error message CCE exe is throwing.

Please let me know if any known solution or what info you might need to fix this. I would really love to get this to run instead of requesting refund.

One thing to note - I don't install games to Program Files as a default location, my steam library is on D: instead. I have seen some bugs in other games before where they would only run in Program Files. Anything like this here? Running it from C: is not an option for me. Screenshot attached.

Andriy

Attachments
Screenshot_1.jpg
Screenshot_1.jpg (6.63 KiB) Viewed 473 times
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

RE: Game does not start - "Could not determine application directory" message

Post by SteveMcClaire »

Hi Andriych,

I've only heard of one other person report this error, and that was also with the Steam version of the game.

There are two situations that this error can indicate:

1) During startup, Windows returns an error when the game asks what directory is the current directory, or when the game tries to set the current directory.

2) Also during startup, when the game tries to determine the Windows user's documents folder. On Windows 10 this should be something like "C:\Users\<user>\Documents\" If the game cannot determine this folder or cannot create a "Gateway to Caen" folder beneath it, you'll get this error.

This is fairly standard for Windows apps and we haven't heard of a general issue with it before. Is there some access restrictions on your machine, perhaps? Like you're not allowed to create / save local information in your 'Documents' folder?

Steve
Andriych
Posts: 26
Joined: Sat Nov 26, 2016 8:15 pm

RE: Game does not start - "Could not determine application directory" message

Post by Andriych »

Hi Steve,

No, I don't have any restrictions. And I've just checked my documents folder, I can see there are folders created by other games there (Like "Paradox" folder).
I have to say that I have about a dozen games installed from Steam lately and none of them errors out. Only having this issue with CC here. So I doubt it's something wrong with my PC setup (which is really straight typical).

Please let me know if there's any information you might want me to collect for troubleshooting to pass to your team for investigation?
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

RE: Game does not start - "Could not determine application directory" message

Post by SteveMcClaire »

Andriych,


Is the Steam install on the same drive as the Windows documents folder?

Is there a "Close Combat Gateway to Caen" folder under your Windows documents folder? If not, try manually creating a series of folders:

"Close Combat Gateway to Caen" in your Windows documents folder.

Then under the "Close Combat Gateway to Caen" folder, create the following folders: "Saved Games", "Temp", and "User Scenarios"

After creating this, try running the game and see if you still get the error.

Steve
Andriych
Posts: 26
Joined: Sat Nov 26, 2016 8:15 pm

RE: Game does not start - "Could not determine application directory" message

Post by Andriych »

Hi Steve,

Tried created the folders - same outcome. And there were none present before I checked.
Also my Steam is installed on D: drive, so different from where my Documents folder is which is C:

Is there a hard code in CC that only checks for C: ?
I had this kind of issue back with some of the very old games from CC series, but I wouldn't imagine anything like this being an issue still these days.
And no, I cannot test this with moving my Steam to C: if that's would be your next suggestion :)
My C: is a smaller sized SSD where I don't have space to install games or anything of that kind, so all that goes to D:

Let me know what to try next. Anything in registry or settings to solve this?
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

RE: Game does not start - "Could not determine application directory" message

Post by SteveMcClaire »

Hi Andriych,

No, it's not hard coded to expect the folder to be on the C drive, but it is possible the old CC engine expects the user data folder to be on the same drive that the game is installed on.

Can you try this please? Create a series of folders on your D drive -- D:\Users\<Your windows username>\Documents\Close Combat Gateway to Caen\. Basically mirror what (should) exist on the C drive but on the same drive where Steam is installed. Then try running the game and see if that works.

Thanks,

Steve
Andriych
Posts: 26
Joined: Sat Nov 26, 2016 8:15 pm

RE: Game does not start - "Could not determine application directory" message

Post by Andriych »

Hi Steve,

Same outcome unfortunately.
Please note that there are 2 things a bit different in my paths.
1) After some latest MS updates there's a OneDrive as part of the path
2) I use localized version on Windows, so "Documents" variable is replaced with a localized (Ukrainian) value.

Please see below:
C:\Users\aqsw1\OneDrive\Äîêóìåíòè\Close Combat Gateway to Caen
Is replicated to:
D:\Users\aqsw1\OneDrive\Äîêóìåíòè\Close Combat Gateway to Caen

(Seems like this forum does not accept any non-English characters... :) )

Still same issue
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

RE: Game does not start - "Could not determine application directory" message

Post by SteveMcClaire »

I went back to look at the code in detail and there are only a few cases where I can see it failing:

If Windows is failing a call to GetCurrentDirectory, which would be odd but possible. This would fail before the game even checked the 'Documents' folder. The only reason I can see this failing is if the directory path where your game is installed is > 260 characters long. Do you have the Steam install way down a directory tree? This seems unlikely, so I assume now. For reference, the default install of "C:\Program Files (x86)\Steam\steamapps\common\Close Combat - Gateway to Caen" is only 74 characters. The only other reason I can think of for this to happen would be some sort of security setting that prevented the game from being able to read the directory. I would expect this to effect other games under steam too, though.

If you're getting past this part and then failing later, it's the documents folder the game can't find, which means a call to SHGetFolderPath() is failing. I can't see any reason this would be the case, assuming you have a user folder 'Close Combat Gateway to Caen' already. You could try deleting this folder (Close Combat Gateway to Caen in your documents folder) and see if the game re-creates it when you try to run. It shouldn't, but if it did that would eliminate the first possibility above as the problem.

I don't know why 'OneDrive' is included in the path you're using, but you might try disabling OneDrive temporarily to see if that has any effect.

The only other test I can think of at this point would be to re-install Steam to a different location of your D drive and re-download Close Combat and see if that fixes it. But is likely to be a pain if you have a lot of steam games.

Steve
Andriych
Posts: 26
Joined: Sat Nov 26, 2016 8:15 pm

RE: Game does not start - "Could not determine application directory" message

Post by Andriych »

Steve,

Just got back to this :) Well, first thing i tried is to clear up drive C and tried installing the game there. Just to see if drive D is an issue. Steam actually allows you to install games in different libraries (1 per drive). So i removed CC and installed it to my C library. Same issue :(

Now to your first 2 points.
Path to the game on drive C now is:
C:\SteamLibrary\steamapps\common\Close Combat - Gateway to Caen

So length is not an issue here.

On the second point - I deleted the CC folder from Documents folder...And it's not getting recreated after I start the game. And still get the same issue.

Any ideas?

User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

RE: Game does not start - "Could not determine application directory" message

Post by SteveMcClaire »

Hi Andriych,

Thanks for the additional information. Since the install folder doesn't seem to be an issue and the game is failing to create the game's local directory in your 'Documents' folder, it sounds like it is something specific to your system that is preventing the game from finding or creating the \documents\Close Combat Gateway to Caen\ folder.

Do you use any special disk or file management software? Anything that might store your personal data in a different way than the default Windows location?

If you're familiar with using RegEdit, we could use that to verify the folder path is present in your system registry. If you can try this, the steps are outlined in this Microsoft article.

https://support.microsoft.com/en-us/hel ... ft-program

Note that this is for older versions of Windows, but the path should be present in the registry even on newer versions like Windows 10. You're looking for:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Where there should be a "Personal" key with a value something like "%USERPROFILE%\Documents" If this key is missing or has an incorrect value that could explain the problem with Close Combat. But I would have expected the game install to have problems with this too, if that were the case.

Steve




Andriych
Posts: 26
Joined: Sat Nov 26, 2016 8:15 pm

RE: Game does not start - "Could not determine application directory" message

Post by Andriych »

Hi Steve,

Attached is the screenshot of the values.
The one thing that stands out (and that I have already expressed before) is that my values are localized with Cyrillic values (I am using a Windows with Ukrainian locale even though the interface is set to English). But i assume your games have been tested for localization.


Another thing to note is that I am also having now a problem with another game from Matrix that I've also bought through Steam.
Here's the related forum thread.
fb.asp?m=4299543
At the same time I have no issues running other games through Steam whatsoever.
Andriych
Posts: 26
Joined: Sat Nov 26, 2016 8:15 pm

RE: Game does not start - "Could not determine application directory" message

Post by Andriych »

With screenshot.
Attachments
Screenshot_1.jpg
Screenshot_1.jpg (278.54 KiB) Viewed 486 times
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

RE: Game does not start - "Could not determine application directory" message

Post by SteveMcClaire »

ORIGINAL: Andriych
The one thing that stands out (and that I have already expressed before) is that my values are localized with Cyrillic values (I am using a Windows with Ukrainian locale even though the interface is set to English). But i assume your games have been tested for localization.

I know people have run the game on all sorts of localized systems without issue, though it is a rather old code base and it's possible there's a new Windows issue that we haven't seen before. I would expect to be hearing a lot more about it if so though.

We can test to see if Cyrillic characters are an issue by manually creating a folder named "C:\Users\aqsw1\OneDrive\Documents" and then temporarily changing the registry to match. If you can then run the game without error, that would pretty much pinpoint the problem. Then you can revert back to your correct folder name so other programs don't have an issue.

I also see "OneDrive" is in your path to your documents folder. I would also suggest taking the following steps to tell Windows to use your local Documents folder and then test if Close Combat can find that correctly:

https://support.office.com/en-us/articl ... 8e8ca70ac7

Hope that helps,

Steve



Post Reply

Return to “Tech Support”