Here you can find a small little library of NSIS macros, functions, and other code snippets. This is a on going project so come back to see new content. If you've got something you think and deem invaluable to this collection, don't hesitate to get in touch with me by leaving a comment in the comment section below. I'm always open to add to this section.
Here's some code that will be useful for those of you who would like to grab the PAFs specifications (product version or company name, etc.) from AppInfo.ini without having to edit PortableApps.comLauncher.nsi manually. This is especially useful if using FGs builds. By using these the values in AppInfo.ini must be there otherwise an error will occur when trying to compile. To remedy this just comment out the ones you won't use; most likely the trademark one.
With this operating system specific macro for Windows 10 you can either enable or disable driver signature enforcement. When this switch is off it will allow you to install unsigned drivers. Be sure to re-enable this setting as this can be a security risk. How it works is it will first check the registry to see if running on Windows 10 and if so will then proceed with the command depending on the given switch parameter.
This function will return the full absolute path of a valid java.exe. This will run a check in the following order: within the App directory installed with the application and if not found there it will then check the %JAVA_HOME% envirornment variable. If that's empty it will then try to look for the corresponding registry entry for it's location. If that fails to yield a location it will look in the current working directory or hope it finds it in the %PATH% envirornment variable.