Dopus & replacing Explorer with relative subfolders

I've got Directory Opus set up to "Replace Explorer for all file system folders (recommended)" and it's not opening folders the same as explorer.exe would.

The latest Tomb Raider (Survival Edition), from Steam, has bonus content that is a folder of stuff supposedly executed via the shell as simply "Survival Edition Content" with the Tomb Raider folder as the current directory. When Directory Opus is set to open folders, it opens a lister to "C:\Program Files\GPSoftware\Directory Opus\Survival Edition Content". When i have Directory Opus set to "Don't replace Explorer", then the correct folder, "D:\Steam\steamapps\common\Tomb Raider\Survival Edition Content", is opened in explorer.exe.

Going to a command prompt to confirm this, if i'm sitting with my current directory as "D:\Steam\steamapps\common\Tomb Raider", and i type 'explorer.exe "Survival Edition Content"', then the correct folder opens up in explorer.exe. If, in the same current directory as before, i type '"c:\Program Files\GPSoftware\Directory Opus\dopus.exe" "Survival Edition Content"', it again opens a Directory Opus lister to "C:\Program Files\GPSoftware\Directory Opus\Survival Edition Content".

Another simple example: Sitting at a command prompt with current directory as "D:", if i type 'explorer.exe steam' then an Explorer opens/browses to my Steam folder on d:. If i type '"c:\Program Files\GPSoftware\Directory Opus\dopus.exe" steam' it opens a new lister with "C:\Program Files\GPSoftware\Directory Opus\steam" as the current folder.

Not sure if this is intended or what. :neutral_face:

Steam wouldn't be running dopus.exe directly so how that behaves with a relative path probably doesn't matter; it'll be something Opus is doing differently in the Explorer Replacement department.

Do you know exactly what Steam is launching in this case? Or is it not Steam itself but a shortcut in the Start Menu or similar?

If it's launched within Steam, where exactly do you launch it from? I don't have this particular game but I have some other Steam games with bonuses (soundtracks) and I can't find a way to make Steam open the folders for them; I have to navigate to them by hand. I'm not sure if I just haven't found the right place in the Steam UI or if it's something that Tomb Raider (Survival Edition) is doing differently to other games.

If we can work out exactly how Steam is launching the folder, we should be able to make Opus support the same thing fairly easily.

(I tried to convince Jon to that I needed a copy of Tomb Raider (Survival Edition) for research purposes but he didn't bite. :slight_smile:)

Hi Leo!

Thanks for the response.

I should've been more clear. Steam isn't launching the bonus content. It's the Tomb Raider launcher (which loads after clicking "Play" in Steam) which has a button called "Survival Edition".

I gave you the command prompt example as a guess as to what's going on there. I'm not an expert on the shell, but i presume that shell execute hooks, when simply calling the "open" or whatever verb on a folder, just insert "explorer.exe" or "dopus.exe" (whichever is set as the folder handler) before the folder name and execute it.

If you go to a command prompt, cd to c:, and then type "explorer.exe Windows", an Explorer will open with your C:\Windows folder as the current folder.

If you do the same, except type ""c:\Program Files\GPSoftware\Directory Opus\dopus.exe" windows", then Directory Opus will open a new lister that's trying to browse to "C:\Program Files\GPSoftware\Directory Opus\windows".

Here's the example console session:

[code]C:\Users\Chris>cd ..

C:\Users>cd ..

C:>explorer windows

C:>"c:\Program Files\GPSoftware\Directory Opus\dopus.exe" windows


The first explorer.exe launch opens an Explorer to c:\Windows. The second dopus.exe launch, opens a lister to "C:\Program Files\GPSoftware\Directory Opus\windows".

I think Directory Opus needs to check if the path is absolute. If it's not, then open it in relation to the current directory (on the win32 API level) of the shell execution, not the directory of dopus.exe. I don't even know if there's a way to get the "current directory" of a shell execute. I presume it should just be set for you already to retrieve via "GetCurrentDirectory()". I honestly have no idea. Always wanted to try my hand in shell extensions and hooks, but it's too scary.

Hehehe, damn! Well, if it helps your case any, i tried Process Monitor and i couldn't figure out exactly how Tomb Raider's launcher is actually launching the folder, so, i guess the only course of action, if the CLI/console example i gave before is not relevant, is to very seriously (because this may just be the most serious problem ever :wink: ), as a purely business expense, purchase Tomb Raider. And not just the regular edition! It's got to the be the Survival Edition so you get that boner bonus folder to execute. :smiley: Maybe somebody with an excess of cash on these forums and a love for the 100% accurate emulation of Explorer functions, can fulfil that wishlist for you, for us, and for all of mankind! :thumbsup:

Thanks for the extra info!

There's more going on behind the scenes to implement Explorer Replacement than just swapping dopus.exe for explorer.exe on the command line, so what dopus.exe does with paths probably doesn't matter.

Looks like we'll need to see exactly what Tomb Raider's launcher is running, so I've got a copy of it downloading to my Steam account now. Once it's downloaded I'll start debugging!

We've fixed this for the next update.

Awesome! :smiley: Thanks muchly for your efforts on this.

Now the only thing left to do is to play the rest of Tomb Raider, purely for business reasons of course, to make sure there are absolutely no other conflicts or incompatibilities or inconsistencies with it and Directory Opus. :wink:

Don't give him ideas!