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

[DirectoriesMove]
Pencil=%APPDATA%\Pencil
Local=%LOCALAPPDATA%\Pencil
PencilUserProfile=%USERPROFILE%\.pencil

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

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

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\PencilUserProfile\config.json
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\PencilUserProfile\config.json
Find=DefaultDirectoryForPencilProjectPortable
Replace=%PortableApps.comDocuments:DoubleBackslash%\\
