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).