russurquhart1
6th April 2012 14:25 UTC
Searching path for multiple versions
Hi,
I've read the functions for replacing, and appending values to a path env variable.
I want to check for all possible versions supported in an evn variable. e.g. if checking gs for all versions, i'd like to look for something like C:\Program Files\gs\* in the env value, and then, delete any found prior to appending the new version.
If anyone can give me some pointers on doing this, that would be great!
Thanks,
Russ
Afrow UK
19th April 2012 12:17 UTC
If nothing already exists for this then I would suggest using an array plug-in (such as nsArray) and split the environment variable into array elements. You can then do a search to remove items (you can use StrCpy/StrCmp for that) and then join back together when done.
Edit: Note that the standard NSIS build limits strings to 1024 characters. You must use the special build (or rebuild yourself) to overcome this limit.
Stu