!define MUI_PRODUCT "Test Module"
!define MUI_VERSION "1.0"

!include "${NSISDIR}\Contrib\Modern UI\System.nsh"

;--------------------------------
;Configuration

  ;General
  OutFile "Module Setup.exe"
  
;--------------------------------
;Modern UI Configuration
  
  !define MUI_WELCOMEPAGE
  !define MUI_CUSTOMPAGECOMMANDS_INSTFILES
  !define MUI_FINISHPAGE
  ;!define MUI_FINISHPAGE_NOAUTOCLOSE
  !define MUI_ABORTWARNING
  
;--------------------------------
;Languages
 
  !insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Pages
  
  !insertmacro MUI_PAGECOMMAND_WELCOME
  !insertmacro MUI_PAGECOMMAND_INSTFILES
  !insertmacro MUI_PAGECOMMAND_FINISH
  
;--------------------------------
;Reserve Files

  ;Things that need to be extracted first (keep these lines before any File command!)
  !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE

;--------------------------------
;Installer Sections

Section "sectionName"

  ;Add your stuff here
  ;MessageBox MB_OK "Into aSection"
  
  ;checkpath:
    ;MessageBox MB_OK "Check path"
    ReadRegStr $R0 HKLM "Software\Virtual Coach\Player" "InstallPath"
    ;IfErrors installplayer goodtogo
    
  ;installplayer:
    ;MessageBox MB_OK "Install Player"
    ;ExecWait "$PLUGINSDIR\default.exe"
    ;Goto checkpath
    
  ;goodtogo:
    ;MessageBox MB_OK "Good to go"
    
  SetOutPath "$R0\Content\Test"
    
  File /r "Your\Empty\Directory\Here\*.*"

SectionEnd

;--------------------------------
;Installer Functions
;Function .onInit
;  InitPluginsDir
;FunctionEnd
