[Launch]
ProgramExecutable=ShareX\ShareX.exe
WorkingDirectory=%PAL:AppDir%\ShareX
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true

[RegistryKeys]
screen-capture-recorder=HKCU\Software\screen-capture-recorder

[DirectoriesMove]
ShareX=%PAL:AppDir%\ShareX\ShareX

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\ShareX\*Config.json
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\ShareX\*Config.json
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\ShareX\*Config.json
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\ShareX\History.xml
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\ShareX\History.xml
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir%\

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\ShareX\History.xml
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\ShareX\History.json
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite8]
Type=Replace
File=%PAL:DataDir%\ShareX\History.json
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite9]
Type=Replace
File=%PAL:DataDir%\ShareX\History.json
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

[FileWrite10]
Type=Replace
File=%PAL:DataDir%\ShareX\Backup\*Config*.json
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite11]
Type=Replace
File=%PAL:DataDir%\ShareX\Backup\*Config*.json
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite12]
Type=Replace
File=%PAL:DataDir%\ShareX\Backup\*Config*.json
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\