Detecting VST plugins path (x32/x64)

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

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

Post

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 MSoundFactory MDrummer MCompleteBundle The best plugins in the world :D

Post

On a 64-bit OS

64-bit plugins path = HKEY_LOCAL_MACHINE\SOFTWARE\VST
32-bit plugins path = HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VST

Post

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

Post

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.

Post

bump!

:D

Post

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

Post

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

Post

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:

Post

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.
ImageCakewalk/Sonar Plugin Management Tools

Post

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.

Post

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
ImageCakewalk/Sonar Plugin Management Tools

Post

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:

Post

A very useful script taken from https://github.com/olilarkin/wdl-ol/blo ... Effect.iss

Code: Select all

[Setup]
AppName=IPlugEffect
AppVersion=1.0.0
DefaultDirName={pf}\IPlugEffect
DefaultGroupName=IPlugEffect
Compression=lzma2
SolidCompression=yes
OutputDir=.\
ArchitecturesInstallIn64BitMode=x64
OutputBaseFilename=IPlugEffect Installer
LicenseFile=license.rtf
SetupLogging=yes

[Types]
Name: "full"; Description: "Full installation"
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Components]
Name: "app"; Description: "Standalone application (.exe)"; Types: full custom;
Name: "vst2_32"; Description: "32-bit VST2 Plugin (.dll)"; Types: full custom;
Name: "vst2_64"; Description: "64-bit VST2 Plugin (.dll)"; Types: full custom; Check: Is64BitInstallMode;
Name: "vst3_32"; Description: "32-bit VST3 Plugin (.vst3)"; Types: full custom;
Name: "vst3_64"; Description: "64-bit VST3 Plugin (.vst3)"; Types: full custom; Check: Is64BitInstallMode;
Name: "rtas_32"; Description: "32-bit RTAS Plugin (.dpm)"; Types: full custom;
Name: "aax_32"; Description: "32-bit AAX Plugin (.aaxplugin)"; Types: full custom;
Name: "aax_64"; Description: "64-bit AAX Plugin (.aaxplugin)"; Types: full custom; Check: Is64BitInstallMode;
Name: "manual"; Description: "User guide"; Types: full custom; Flags: fixed

[Files]
Source: "..\build-win\app\Win32\bin\IPlugEffect.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode; Components:app; Flags: ignoreversion;
Source: "..\build-win\app\x64\bin\IPlugEffect.exe"; DestDir: "{app}"; Check: Is64BitInstallMode; Components:app; Flags: ignoreversion;

Source: "..\build-win\vst2\Win32\bin\IPlugEffect.dll"; DestDir: {code:GetVST2Dir_32}; Check: not Is64BitInstallMode; Components:vst2_32; Flags: ignoreversion;
Source: "..\build-win\vst2\Win32\bin\IPlugEffect.dll"; DestDir: {code:GetVST2Dir_32}; Check: Is64BitInstallMode; Components:vst2_32; Flags: ignoreversion;
Source: "..\build-win\vst2\x64\bin\IPlugEffect.dll"; DestDir: {code:GetVST2Dir_64}; Check: Is64BitInstallMode; Components:vst2_64; Flags: ignoreversion;

Source: "..\build-win\vst3\Win32\bin\IPlugEffect.vst3"; DestDir: "{cf}\VST3\"; Check: not Is64BitInstallMode; Components:vst3_32; Flags: ignoreversion;
Source: "..\build-win\vst3\Win32\bin\IPlugEffect.vst3"; DestDir: "{cf32}\VST3\"; Check: Is64BitInstallMode; Components:vst3_32; Flags: ignoreversion;
Source: "..\build-win\vst3\x64\bin\IPlugEffect.vst3"; DestDir: "{cf64}\VST3\"; Check: Is64BitInstallMode; Components:vst3_64; Flags: ignoreversion;

Source: "..\build-win\rtas\bin\IPlugEffect.dpm"; DestDir: "{cf32}\Digidesign\DAE\Plug-Ins\"; Components:rtas_32; Flags: ignoreversion;
Source: "..\build-win\rtas\bin\IPlugEffect.dpm.rsr"; DestDir: "{cf32}\Digidesign\DAE\Plug-Ins\"; Components:rtas_32; Flags: ignoreversion;

Source: "..\build-win\aax\bin\IPlugEffect.aaxplugin\*.*"; DestDir: "{cf32}\Avid\Audio\Plug-Ins\IPlugEffect.aaxplugin\"; Components:aax_32; Flags: ignoreversion recursesubdirs;
Source: "..\build-win\aax\bin\IPlugEffect.aaxplugin\*.*"; DestDir: "{cf}\Avid\Audio\Plug-Ins\IPlugEffect.aaxplugin\"; Components:aax_64; Flags: ignoreversion recursesubdirs;

Source: "..\manual\IPlugEffect_manual.pdf"; DestDir: "{app}"
Source: "changelog.txt"; DestDir: "{app}"
Source: "readmewin.rtf"; DestDir: "{app}"; DestName: "readme.rtf"; Flags: isreadme

[Icons]
Name: "{group}\IPlugEffect"; Filename: "{app}\IPlugEffect.exe"
Name: "{group}\User guide"; Filename: "{app}\IPlugEffect_manual.pdf"
Name: "{group}\Changelog"; Filename: "{app}\changelog.txt"
;Name: "{group}\readme"; Filename: "{app}\readme.rtf"
Name: "{group}\Uninstall IPlugEffect"; Filename: "{app}\unins000.exe"

;[Dirs] 
;Name: {cf}\Digidesign\DAE\Plugins\

[Code]
var
  OkToCopyLog : Boolean;
  VST2DirPage_32: TInputDirWizardPage;
  VST2DirPage_64: TInputDirWizardPage;

procedure InitializeWizard;
begin
  if IsWin64 then begin
    VST2DirPage_64 := CreateInputDirPage(wpSelectDir,
    'Confirm 64-Bit VST2 Plugin Directory', '',
    'Select the folder in which setup should install the 64-bit VST2 Plugin, then click Next.',
    False, '');
    VST2DirPage_64.Add('');
    VST2DirPage_64.Values[0] := ExpandConstant('{reg:HKLM\SOFTWARE\VST,VSTPluginsPath|{pf}\Steinberg\VSTPlugins}\');

    VST2DirPage_32 := CreateInputDirPage(wpSelectDir,
      'Confirm 32-Bit VST2 Plugin Directory', '',
      'Select the folder in which setup should install the 32-bit VST2 Plugin, then click Next.',
      False, '');
    VST2DirPage_32.Add('');
    VST2DirPage_32.Values[0] := ExpandConstant('{reg:HKLM\SOFTWARE\WOW6432NODE\VST,VSTPluginsPath|{pf32}\Steinberg\VSTPlugins}\');
  end else begin
    VST2DirPage_32 := CreateInputDirPage(wpSelectDir,
      'Confirm 32-Bit VST2 Plugin Directory', '',
      'Select the folder in which setup should install the 32-bit VST2 Plugin, then click Next.',
      False, '');
    VST2DirPage_32.Add('');
    VST2DirPage_32.Values[0] := ExpandConstant('{reg:HKLM\SOFTWARE\VST,VSTPluginsPath|{pf}\Steinberg\VSTPlugins}\');
  end;
end;

function GetVST2Dir_32(Param: String): String;
begin
  Result := VST2DirPage_32.Values[0]
end;

function GetVST2Dir_64(Param: String): String;
begin
  Result := VST2DirPage_64.Values[0]
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep = ssDone then
    OkToCopyLog := True;
end;

procedure DeinitializeSetup();
begin
  if OkToCopyLog then
    FileCopy (ExpandConstant ('{log}'), ExpandConstant ('{app}\InstallationLogFile.log'), FALSE);
  RestartReplace (ExpandConstant ('{log}'), '');
end;

[UninstallDelete]
Type: files; Name: "{app}\InstallationLogFile.log"

Post Reply

Return to “DSP and Plugin Development”