[Launch]
ProgramExecutable=RStudio\RStudio.exe
RunAsAdmin=force 
WaitForEXE1=RStudio32.exe
WaitForEXE2=RStudio64.exe
WaitForEXE2=ruviewer.exe
DirectoryMoveOK=yes 

[Activate]
Registry=true

[RegistryKeys]
R-Studio_CU=HKCU\Software\R-TT\R-Studio
R-Studio_LM=HKLM\Software\R-TT\R-Studio

[RegistryValueBackupDelete]
1=HKCU\Software\R-TT\Language

[RegistryCleanupIfEmpty]
1=HKCU\Software\R-TT
2=HKLM\Software\R-TT

[DirectoriesMove]
R-Studio=%APPDATA%\R-TT\R-Studio
Documents=%Documents%\R-TT\R-Studio
RECOVERY=%Documents%\R-TT\RECOVERY

[DirectoriesCleanupIfEmpty]
1=%APPDATA%\R-TT
2=%Documents%\R-TT

[Language]
Base=%PortableApps.comLocaleName%
Default=en
CheckIfExists=%PAL:AppDir%\RStudio\%PAL:LanguageCustom%\*.*
DefaultIfNotExists=en

[LanguageStrings]
ENGLISH=en
SIMPCHINESE=zhCN
TRADCHINESE=zhHK
GERMAN=de
FRENCH=fr
JAPANESE=ja
PORTUGUESE=pt
RUSSIAN=ru
SPANISH=es 

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\R-Studio\settings.ini
Find=%PAL:LastPackagePartialDir%
Replace=%PAL:PackagePartialDir%

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\R-Studio\settings.ini
Find=%PAL:LastPortableAppsBaseDir%
Replace=%PAL:PortableAppsBaseDir%

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\R-Studio\settings.ini
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\R-Studio\settings.ini
Find=%PAL:LastPackagePartialDir:ForwardSlash%
Replace=%PAL:PackagePartialDir:ForwardSlash%

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\R-Studio\settings.ini
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%
Replace=%PAL:PortableAppsBaseDir:ForwardSlash%

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\R-Studio\settings.ini
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\R-Studio\settings.ini
Find=%LastUserName%
Replace=%UserName%















