Get OW installation path

Hello,
Can you please add a way for us to get the OW installation path?

With it we’ll be able to access FFMPEG, for example, that comes bundled up with OW.
Thanks
Eyal

Looking at the Registry you should find Overwolf as installed program, using this C# plugin, i know it’s not what you asked for, but it works if you know the correct Registry key and reading the Registry doesnt require privileged permissions

The Registry path is SOFTWARE\WOW6432Node\Overwolf, key InstallFolder

using Microsoft.Win32;

using System;

namespace overwolf.plugins

{

    public class RegistryKeyReadResult

    {

        public string status { get; set; }

        public bool exists { get; set; }        

        public object value { get; set; }

        public string error { get; set; }

    }

    public class RegistryReader

    {       

        public RegistryKeyReadResult getValueFromLocalMachineSync(string subKeyName, string keyName)

        {

            try

            {

                RegistryKey localKey;

                if (Environment.Is64BitOperatingSystem)

                    localKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);

                else

                    localKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);

                object value = localKey.OpenSubKey(subKeyName).GetValue(keyName);

                return new RegistryKeyReadResult()

                {

                    status = "success",

                    exists = value != null,

                    value = value,

                };

            }

            catch (Exception ex)

            {

                return new RegistryKeyReadResult()

                {

                    status = "error",

                    error = ex.Message

                };

            }

        }

        public void getValueFromLocalMachine(string subKeyName, string keyName, Action<object> callback)

        {

            callback(this.getValueFromLocalMachineSync(subKeyName, keyName));

        }

    }

}
2 Likes

Hey, @Eyal.

The above could work (I didn’t test it), but I guess you want it as part of the API.
I would say that the right place for that will be on the overwolf.io.paths API. But we will discuss the FR internally and let you know.

In terms of prioritization - is it an essential/critical feature for your app? Do you currently have a workaround?
Thanks!

Hi @eransharv,
We need this to be able to start working on advanced editing options with FFMPEG.
I haven’t tried the workaround suggested by @dowmeister (Thanks btw :slight_smile:).

I use the RegistryReader class to identify if and where Steam and games my app support are installed and it works perfectly, fyi

@Eyal added to the backlog (currently planned to iteration 0.170).

Added the following properties to overwolf.io.paths:

  • overwolf install dir : ‘overwolf.io.paths.overwolfInstallation’.
  • overwolf install dir with version number : ‘overwolf.io.paths.overwolfInstallationWithVersion’.
  • obs dir : ‘overwolf.io.paths.obsBin’.

That’s amazing! Thanks!

The docs are missing the MIN OW VERSION per path - from which OW version can we use it?

@Eyal it’s available from OW v0.169.

What do you mean by “The docs are missing the MIN OW VERSION per path”?

1 Like

@eransharv I mean that unlike other places in the docs where we have min OW version (for new API functions), I don’t see it in the overwolf.io.paths docs.

@Eyal ok, now I get you. So the reason is that this API is built a little bit differently than the other APIs: there are no functions or events. It’s more like enums. But I added some info for the new additions: