VST path from registry
-
- KVRian
- 1256 posts since 15 Mar, 2007 from Yorkshire, England
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
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
-
- KVRian
- Topic Starter
- 1256 posts since 15 Mar, 2007 from Yorkshire, England
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
Still does not explain why I don't have a HKEY_LOCAL_MACHINE\SOFTWARE\VST on my machine
-
- KVRian
- Topic Starter
- 1256 posts since 15 Mar, 2007 from Yorkshire, England
Actually thinking I might abandon using Installshield LE it is too limited. Anyone recommend a different installer?
-
- KVRAF
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
-
- KVRian
- Topic Starter
- 1256 posts since 15 Mar, 2007 from Yorkshire, England
-
- KVRist
- 88 posts since 9 May, 2011
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.
)
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
-
- KVRian
- 882 posts since 24 Jun, 2002 from Berlin
- KVRAF
- 8484 posts since 12 Feb, 2006 from Helsinki, Finland
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.
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
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.
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.
- KVRAF
- 10286 posts since 17 Sep, 2004 from Austin, TX
Is there any particular reason that VSTs are installed into the protected Program Files (extremely annoying on Windows
?
If not, is there any particular reason not to simply install them into a Library (like the Documents, Music or Videos Libraries)?
If not, is there any particular reason not to simply install them into a Library (like the Documents, Music or Videos Libraries)?
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
So other users of the machine can access them?runagate wrote:Is there any particular reason that VSTs are installed into the protected Program Files (extremely annoying on Windows?
If not, is there any particular reason not to simply install them into a Library (like the Documents, Music or Videos Libraries)?
It's a legacy thing. The original VST folder was /Program Files/Steinberg/vstplugins/
- KVRAF
- 10286 posts since 17 Sep, 2004 from Austin, TX
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.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/
2) Oh, I well know that. One of many annoying locked-in poor early decisions in our particular ecosystem.
- KVRAF
- 8484 posts since 12 Feb, 2006 from Helsinki, Finland
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.runagate wrote:Is there any particular reason that VSTs are installed into the protected Program Files (extremely annoying on Windows?
If not, is there any particular reason not to simply install them into a Library (like the Documents, Music or Videos Libraries)?
-
- KVRAF
- 5633 posts since 18 Jul, 2002
I'm working on updated Inno Setup installers and found your script very useful
https://github.com/olilarkin/wdl-ol/blo ... Effect.iss
- KVRAF
- 12615 posts since 7 Dec, 2004
An important thing to note is the difference between system (localmachine) vs. user:
Example NSIS .nsi:
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.
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
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.
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.


