; The name of the installer Name "InstallDirRegKeySample" ; If you don't really need an UAC prompt, for example, you avoid HKLM RequestExecutionLevel user ; The file to write ; At least in Vista/W7 times, an exename containing "install" may triggered UAC OutFile "DirRegKeySample.exe" ; The default installation directory ; For first time the installer offers this InstallDir "$PROGRAMFILES\Defaultpath" ; But if this exists and pass some validations, it will replace it ; Roll your own key name, don't use other's InstallDirRegKey HKCU "SOFTWARE\VICOKOBY" "0" Page directory Page instfiles Section Main ; We can change anything explicitly. No random changes make users happy. ; Also, no pollution after cancelling the installation beyond the dir page WriteRegStr HKCU "SOFTWARE\VICOKOBY" "0" "$InstDir" SectionEnd