[Launch]
ProgramExecutable=MasterPDFEditor\MasterPDFEditor.exe
ProgramExecutable64=MasterPDFEditor64\MasterPDFEditor.exe
DirectoryMoveOk=yes

[Activate]
Registry=true

[RegistryKeys]
MasterPDFEditor="HKCU\Software\Code Industry"
-=HKCU\Software\Classes\Applications\MasterPDFEditor.exe
-=HKCU\Software\Classes\MasterPDFEditor5.Document
-=HKCU\Software\Classes\SystemFileAssociations\.pdf\shell\MasterPDFEditor5.Document
-=HKCU\Software\Classes\SystemFileAssociations\.xps\shell\MasterPDFEditor5.Document
-=HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\MasterPDFEditor.exe

[RegistryValueBackupDelete]
1=HKCU\Software\Classes\.pdf\OpenWithProgids\MasterPDFEditor5.Document
2=HKCU\Software\Classes\.xps\OpenWithProgids\MasterPDFEditor5.Document

[DirectoriesMove]
MasterPDFEditor="%USERPROFILE%\AppData\Local\Master PDF Editor"

[DirectoriesCleanupForce]
1="%UserProfile%\AppData\LocalMaster PDF Editor"

[FileWrite1]
Type=Replace
File=%pal:DataDir%\Settings\MasterPDFEditor.reg
Find=%USERPROFILE%\\AppData\\Local
Replace=%pal:DataDir:doublebackslash%

[FileWrite2]
Type=Replace
File=%pal:DataDir%\Settings\MasterPDFEditor.reg
Find=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite3]
Type=Replace
File=%pal:DataDir%\Settings\MasterPDFEditor.reg
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\