[Launch]
ProgramExecutable="KeyCtrl\keyctrl.exe"
WorkingDirectory="%PAL:AppDir%\KeyCtrl"
DirectoryMoveOk=yes

[Activate]
Registry=true

[RegistryKeys]
KeyCtrl="HKCU\Software\ASCOMP\KeyCtrl"

[RegistryCleanupIfEmpty]
1=HKCU\Software\ASCOMP

[DirectoriesMove]
KeyCtrl="%AppData%\ASCOMP Software\KeyCtrl"

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\KeyCtrl.reg
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\KeyCtrl.reg
Find=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\settings\KeyCtrl.reg
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\