Counter Strike – Why Condition Zero Doesn’t Play Intro Videos if Installation Path Has Spaces

videowindowswindows 10

I have Counter Strike: Condition Zero game. Whenever I install it in a folder like C:\FolderName and launch the game after intallation, the game starts with 2 intro videos (I found those videos inside game installation folder, both have .avi extensions).

But a pretty weird behavior I noticed. If I remove and install game again in C:\Folder Name the game works fine except that those 2 intro videos won't play at launch. Pretty weird.

To confirm if this is the exact reason, I tried at least 15 times installation of this game with different named folders. Few with folder name with spaces, and few without spaces. And it confirmed that those intro videos won't play if the folder name has any spaces.

Those video files have this path: C:\My Folder Name\czero\media OR C:\MyFolderName\czero\media

The game launch hl.exe file has path: C:\My Folder Name OR C:\MyFolderName

The game installs properly in both cases but videos play only in 2nd case i.e., MyFolderName.

Looks like either the game tries to avoid .avi files or some Windows feature forces the game to not play those files – whenever there are space(s) in folder name.

I would ask it on gaming SE network, but I strongly feel this weird behavior is just because of space in main folder name and related to those .avi files only.

Can there any particular reason for it? Is it because of some Firewall/Antivirus/UAC protection and rules?

Best Answer

Sounds like a bug in the game where the code opens video without quotes and as such part of the video path is assumed to be a parameter where it really isn't, resulting in an error, and thus the video never plays. Console will probably log an error too.

To explain this a bit... In Windows, when you work with paths, you either type it as such:

C:\My_Path_without_spaces

or

"C:\My Path With Spaces"

Note the quotes.

When you start an external program, for example a video player, the video player may have its argument list as follows (this is an example)

C:\Games\HalfLife\bin\videoplayer.exe /video C:\Games\HalfLife\intro.avi
                      ^ path to videoplayer
                                      ^parameter video
                                             ^video file

Now lets say you have Half Life as foldername:

C:\Games\Half Life\bin\videoplayer.exe /video C:\Games\Half Life\intro.avi
                       ^ path to videoplayer (the space may break here too)
                                       ^parameter video
                                              ^video file
                                                            ^invalid parameter
 

There's no video called Half without extension nor does it understaned the Life\intro.avi as parameter as the videoplayer does not recognize it.

Note that HalfLife 1 is a very old game. It was in the era where 8.3 length filenames were still very common.

Related Question