VST path from registry

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Hi, I am working on an installer for my app (using the InstallShield LE that comes with Visual Studio) and trying to find a way to get the user's VST path. The only registry entry info. I could find came from here: http://www.asseca.com/setVSTpath/index.html with the following:

The following registry-key is set (win-x32):
HKEY_LOCAL_MACHINE\SOFTWARE\VST\VSTPluginsPath
The following registry-keys are set (win-x64):
HKEY_LOCAL_MACHINE\SOFTWARE\VST\VSTPluginsPath
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VST\VSTPluginsPath

Looking on my own machine I only have the last of those entries which seems odd. I also wondered if there was an environment variable set but cant fine one. So how do installers find out the user's VST path? I will need to do separate ones for 32 and 64 bit VST 2.4 installations.

thanks in advance

Post

Just found this similar thread: http://www.kvraudio.com/forum/viewtopic.php?t=319194

Still does not explain why I don't have a HKEY_LOCAL_MACHINE\SOFTWARE\VST on my machine

Post

Actually thinking I might abandon using Installshield LE it is too limited. Anyone recommend a different installer?

Post

Some hosts use their own variants, I'm on the wrong machine atm, but I'll post through a list of the ones we check.

We use Inno Setup, which is adaptable, great, and free..
Image

Post

Thanks a lot, that would be useful. I am just downloading Inno, looks good

Post

We use NSIS currently, and I think that works pretty good. Have used Inno Setup before as well, and that was also neat. Between those two I think it's mostly a matter of taste.

About why you have some key or another set, I think that depends on what DAWs you have run. In a freshly installed windows, none of them will be set, and it's kind of up to the DAW to set it if it feels like it. I know in setups I've had, I got the 32-bit one set but not the 64-bit, so... I'd say try to use defaults where no keys exist.

By the way, with NSIS it's possible to read 32-bit and 64-bit values explicitly without having two installers, but you may have other reasons as well for keeping them different. Just saying. :)

(EDIT: Might note that the currently publicly available installers for our plugs ONE and Faturator don't actually use the registry, so they're a bad example. Our new installers which aren't released yet do, though. :) )
kiloHearts Developer

Post


Post

Those mentioned in the original post are the most reliable ones if you REALLY REALLY need to have an installer. Never use them directly though: default a selection there, then show it to the user to user to sanity check and/or change if it's wrong.

Post

NSIS is good and simple to learn.

And that registry entry is only for Steinberg hosts (and I think only the older, VST 2.x hosts). Many other hosts don't use it, so you can't count on it being there. Doesn't hurt to check it and use it as a default if it's there, but always give the user a chance to change the location in the installer.

And yes, some users are allergic to installers. They think they're a security risk or something silly. (They don't seem to realize the plug-in code runs under the same security context as the installer. And a plug-in could just as easily be malicious as an installer.) So providing a zipped copy of the plug-in helps.

And any registry settings or other things should be done by the plug-in itself when it's instantiated, not by the installer. So other than copying the plug-in to a folder, the installer really doesn't do anything.

Post

Is there any particular reason that VSTs are installed into the protected Program Files (extremely annoying on Windows 8)?

If not, is there any particular reason not to simply install them into a Library (like the Documents, Music or Videos Libraries)?

Post

runagate wrote:Is there any particular reason that VSTs are installed into the protected Program Files (extremely annoying on Windows 8)?

If not, is there any particular reason not to simply install them into a Library (like the Documents, Music or Videos Libraries)?
So other users of the machine can access them?

It's a legacy thing. The original VST folder was /Program Files/Steinberg/vstplugins/

Post

AdmiralQuality wrote:
So other users of the machine can access them?

It's a legacy thing. The original VST folder was /Program Files/Steinberg/vstplugins/
1) Excellent point, but probably not worth it in this case. Thanks for reminding me, somehow that'd escaped me after all this time and many, many reinstalls.

2) Oh, I well know that. One of many annoying locked-in poor early decisions in our particular ecosystem.

Post

runagate wrote:Is there any particular reason that VSTs are installed into the protected Program Files (extremely annoying on Windows 8)?

If not, is there any particular reason not to simply install them into a Library (like the Documents, Music or Videos Libraries)?
I just install them all to "C:\users\teemu\Vst Plugins" which I patched manually to the registry so a surprising number of installers actually gets it right automatically. ;)

Post

hibrasil wrote:my innosetup script is here:

https://github.com/olilarkin/wdl-ol/blo ... Effect.iss
I'm working on updated Inno Setup installers and found your script very useful :) The URL was giving a 404 but here it is a working one:

https://github.com/olilarkin/wdl-ol/blo ... Effect.iss

Post

An important thing to note is the difference between system (localmachine) vs. user:

Example NSIS .nsi:

Code: Select all

SetCompressor /SOLID lzma
Name "Xhip v8 64-bit"
OutFile "xhip_8_64bit.exe"
InstallDir "/vstplugins"

RequestExecutionLevel admin
DirText "Please choose the directory where vst plugins should be copied. A subdirectory /xhip will be created there." "" "" ""
Page directory
Page instfiles

Function .onInit
	ReadRegStr $INSTDIR HKCU Software\VST VSTPluginsPath
	StrCmp $INSTDIR "" 0 OK
	ReadRegStr $INSTDIR HKLM Software\VST VSTPluginsPath
	StrCmp $INSTDIR "" 0 OK
	StrCpy $INSTDIR "/vstplugins"
	OK:
FunctionEnd

Section ""
  SetOutPath $INSTDIR\xhip
  File xhip_8_64bit.dll
SectionEnd
It would be best to override the path if set by the user, otherwise default to the system-wide path, otherwise rely on the user to specify the path. This is the result provided in the script above.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post Reply

Return to “DSP and Plugin Development”