Skip to content
⌘ NSIS Forum Archive

command execution before install directory selection

3 posts

honold#

command execution before install directory selection

is it possible to pull this off in nsis2? there are a number of checks (verify valid os, verify user is administrator, check for a previous installation, etc) that i want to do BEFORE the user actually selects the folder they want to install to.
honold#
learned to use .onInit, nevermind on most of that...

now researching how to use the installdiregkey with dirshow to only show the directory selection if the key doesn't exist, looks like it's feasible
kichik#
Verifying everything is best to be done in .onInit. If you want to do it right before the directory selection page put it in the directory selection page pre-function (Page directory <pre-function> <post-function>).

For example:

Page directory preDirFunc
Function preDirFunc
  ; verify stuff
FunctionEnd