Login / Register  0 items | $0.00New @ What is KVR? Submit News Advertise

Detecting VST plugins path (x32/x64)

DSP, Plug-in and Host development discussion.

Moderator: Moderators (Main)

z_old_account
KVRist
 
441 posts since 12 Mar, 2002, from Munich / Bavaria / Germany

Postby z_old_account; Sun May 22, 2011 11:54 pm Detecting VST plugins path (x32/x64)

Hello fellow devs,

I am just wondering what the correct way to detect the vst plugins path for a x64 installer is (inno setup).

Beside of that someone mentioned in another thread that:
"The key is either HKEY_CURRENT_USER\Software\VST\VSTPluginsPath or
HKEY_LOCAL_MACHINE\Software\VST\VSTPluginsPath"


My current code for the x32/x64 installer is:

function ReadVSTPluginsPath (Param: String): String;
var
VSTPluginsPath: String;
begin
Result := '';
if (RegQueryStringValue(HKEY_LOCAL_MACHINE_32, 'Software\VST',
'VSTPluginsPath', VSTPluginsPath)) then
Result := VSTPluginsPath
else
Result := ExpandConstant('{pf}') + '\Steinberg\Vstplugins';
end;


So would a better version for the x32 installer be?

function ReadVSTPluginsPath (Param: String): String;
var
VSTPluginsPath: String;
begin
Result := ExpandConstant('{pf}') + '\Steinberg\Vstplugins';
if (RegQueryStringValue(HKEY_LOCAL_MACHINE_32, 'Software\VST',
'VSTPluginsPath', VSTPluginsPath)) then
Result := VSTPluginsPath;
if (RegQueryStringValue(HKEY_CURRENT_USER_32, 'Software\VST',
'VSTPluginsPath', VSTPluginsPath)) then
Result := VSTPluginsPath;
end;


And for the x64 installer?

function ReadVSTPluginsPath (Param: String): String;
var
VSTPluginsPath: String;
begin
Result := ExpandConstant('{pf}') + '\Steinberg\Vstplugins';
if (RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\VST',
'VSTPluginsPath', VSTPluginsPath)) then
Result := VSTPluginsPath;
if (RegQueryStringValue(HKEY_CURRENT_USER, 'Software\VST',
'VSTPluginsPath', VSTPluginsPath)) then
Result := VSTPluginsPath;
end;

Thanks in advance,
Markus
User avatar
MeldaProduction
KVRAF
 
6907 posts since 15 Mar, 2008, from Czech republic

Postby MeldaProduction; Mon May 23, 2011 1:02 am

I think it is not even in registry. For example many users use their own paths, and some even use multiple paths for different hosts. I'm personally using simple convention of finding the first existing folder -
{program files}\VstPlugins
{program files}\Steinberg\VstPlugins
(maybe something more, but I think the 2 specified are the most common, similarly for x64)
Vojtech - MeldaProduction
Image
Dozius
KVRian
 
747 posts since 26 Oct, 2005

Postby Dozius; Mon May 23, 2011 6:08 am

On a 64-bit OS

64-bit plugins path = HKEY_LOCAL_MACHINE\SOFTWARE\VST
32-bit plugins path = HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VST
z_old_account
KVRist
 
441 posts since 12 Mar, 2002, from Munich / Bavaria / Germany

Postby z_old_account; Tue May 24, 2011 9:16 pm

On 64 bit OS there are two {program files} directories. I currently install 64 bit plugins to C:\Program Files\Steinberg\Vstplugins and 32 bit plugins to C:\Program Files (x86)\Steinberg\Vstplugins .
It would also be good to know what the most common default location for an installation of the various hosts is...

Two common locations that i know are:
C:\Program Files (x86)\Steinberg\Vstplugins
C:\Program Files (x86)\Vstplugins
No_Use
KVRAF
 
1914 posts since 13 Mar, 2004

Postby No_Use; Tue May 24, 2011 9:29 pm

I'm not a programmer but since there are some plugin devs around here now I just wanted to mention that I don't like when plugins are automatically directed to C:\Steinberg\Vstplugins or some such, as I never ever use that folder location for plugins. My plugin folder for example is simply D:\plugins.
z_old_account
KVRist
 
441 posts since 12 Mar, 2002, from Munich / Bavaria / Germany

Postby z_old_account; Mon May 30, 2011 1:52 am

bump!

:D
mystran
KVRAF
 
4279 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Mon May 30, 2011 2:55 am

No_Use wrote:I'm not a programmer but since there are some plugin devs around here now I just wanted to mention that I don't like when plugins are automatically directed to C:\Steinberg\Vstplugins or some such, as I never ever use that folder location for plugins. My plugin folder for example is simply D:\plugins.


Almost any plugin installer will get the registry value "VSTPluginsPath" from the key HKEY_LOCAL_MACHINE\SOFTWARE\VST (or if you're on 64-bit, and you're installing a 32-bit plugin HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VST).

You can add this in regedit: under HKEY_LOCAL_MACHINE\SOFTWARE (or on 64-bit go into WoW6432Node) add a key "VST" and then string-type value "VSTPluginsPath" with it's "value data" being the full directory path (eg. D:\plugins or whatever; I use "C:\users\teemu\VST Plugins"). If the above value already exists, your host or something set it already; in this case just give VSTPluginsPath a new "value data".
Image <- plugins | forum
Ken McLaren
KVRian
 
906 posts since 24 Mar, 2009, from Canada

Postby Ken McLaren; Tue Jul 26, 2011 7:11 pm

Markus, I do this instead..

DefaultDirName={reg:HKLM\Software\VST\,VSTPluginsPath|C:\VSTPlugins}AcmeBarGig\HeadCase

Everything we are making now is portable in nature, meaning if you want to copy it to a USB stick you only need to copy one folder. Not 5 gazillion located all over the computer...I'm done with dicking with Windows paths..haha

Anyways under this ideology we only ever need one path to all executables including DLL files. Where you could conceivably run into problems using the above DefaultDirName setting is if you need to install other executables into a different folder, like program files. In that case I had to have two forms, one pascal based like what you have above to detect the VSTPluginsPath, and one to display the Program files folder..

As for the 64 bit plugs, I can't help there as we are not working in that yet, nevertheless, you may be able to use that DefaultDirName idea still..
Hope that helps
KM
koalaboy
KVRAF
 
1661 posts since 18 Mar, 2006, from Plymouth, UK

Postby koalaboy; Wed Jul 27, 2011 3:49 am

I install mine to:

L:\VSTs\32Bit
&
L:\VSTs\64Bit

The trick these days is finding a host that writes a common registry value correctly, especially as many people run multiple hosts (potentially with different plugin paths).

Then again, I'm a user rather than a developer, so I just get to moan :wink:
TheSteven
KVRian
 
580 posts since 5 Jul, 2005, from Southern California

Postby TheSteven; Wed Jul 27, 2011 7:20 pm

There are a number of things developers can do to make their plug-ins appear more use friendly and windows compatible - especially with Vista and Windows7.

For starters:
  • If your plug-in uses an installer avoid storing your plug-ins in protected areas such as Program Files.
  • If your plug-in uses an installer - store the location of where your user saves your plug-in in the registry and for updates or reinstallations use that location as the default.
  • If your plug-in saves data (settings, patches, etc.) avoid storing that in protected areas such as Program Files or using areas of the registry that require administrative rights to write to.
Image
Jeff McClintock
KVRist
 
257 posts since 30 Jan, 2005, from New Zealand

Postby Jeff McClintock; Thu Jul 28, 2011 1:36 pm

C:\Program Files (x86)\Common Files\Steinberg\VST2 (64-bit)
C:\Program Files\Common Files\Steinberg\VST2 (32-bit)

.. Are the place.

C:\Program Files (x86)\Steinberg\VstPlugins

..is in theory only for Steinberg plugins, because Microsoft says you're not ment to mess directly with folders 'owned' by a program, i.e. program files not in a common folder.
TheSteven
KVRian
 
580 posts since 5 Jul, 2005, from Southern California

Postby TheSteven; Thu Jul 28, 2011 6:41 pm

Jeff McClintock wrote:C:\Program Files (x86)\Common Files\Steinberg\VST2 (64-bit)
C:\Program Files\Common Files\Steinberg\VST2 (32-bit)

.. Are the place.

C:\Program Files (x86)\Steinberg\VstPlugins

..is in theory only for Steinberg plugins, because Microsoft says you're not ment to mess directly with folders 'owned' by a program, i.e. program files not in a common folder.


On a 64 bit system
C:\Program Files\
- is used for 64 bit apps
and
C:\Program Files (x86)\
- is used by 32-bit apps
Image
Crackbaby
KVRAF
 
3054 posts since 10 Sep, 2003, from Karlskoga, Stockholm, Sweden

Postby Crackbaby; Tue Apr 14, 2015 11:26 pm Re:

mystran wrote:
No_Use wrote:I'm not a programmer but since there are some plugin devs around here now I just wanted to mention that I don't like when plugins are automatically directed to C:\Steinberg\Vstplugins or some such, as I never ever use that folder location for plugins. My plugin folder for example is simply D:\plugins.


Almost any plugin installer will get the registry value "VSTPluginsPath" from the key HKEY_LOCAL_MACHINE\SOFTWARE\VST (or if you're on 64-bit, and you're installing a 32-bit plugin HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VST).

You can add this in regedit: under HKEY_LOCAL_MACHINE\SOFTWARE (or on 64-bit go into WoW6432Node) add a key "VST" and then string-type value "VSTPluginsPath" with it's "value data" being the full directory path (eg. D:\plugins or whatever; I use "C:\users\teemu\VST Plugins"). If the above value already exists, your host or something set it already; in this case just give VSTPluginsPath a new "value data".


Thanks, just used this to add plugins to Audacity 2.5!!
:hug:

Moderator: Moderators (Main)

Return to DSP and Plug-in Development