[Launch]
ProgramExecutable=BYOND\bin\byond.exe
WaitForOtherInstances=true
WaitForEXE1=dreamseeker.exe
WaitForEXE2=dreamdaemon.exe
WaitForEXE3=dreammaker.exe
WaitForEXE4=dm.exe
WaitForEXE5=dreamdeploy.exe
WaitForEXE6=mydream.exe
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true

[RegistryKeys]
Dantom=HKCU\Software\Dantom
byond=HKCR\byond
-=HKLM\SOFTWARE\Classes\byond

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\byond.reg
Find=DEFAULTBYONDPORTABLEBASEPATH
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\Dantom.reg
Find=DEFAULTBYONDPORTABLEBASEPATH
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%

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

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

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

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

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

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

[FileWrite9]
Type=Replace
File=%PAL:DataDir%\BYONDData\cfg\daemon.txt
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite10]
Type=Replace
File=%PAL:DataDir%\BYONDData\cfg\daemon.txt
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite11]
Type=Replace
File=%PAL:DataDir%\BYONDData\cfg\daemon.txt
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

[FileWrite12]
Type=Replace
File=%PAL:DataDir%\BYONDData\cfg\maker.txt
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite13]
Type=Replace
File=%PAL:DataDir%\BYONDData\cfg\maker.txt
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite14]
Type=Replace
File=%PAL:DataDir%\BYONDData\cfg\maker.txt
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\
