Guest User

Untitled

a guest
Jun 24th, 2018
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !macro CustomCodePreInstall
  2.     ${If} ${FileExists} "$INSTDIR\Data\user\*.*"
  3.         Rename "$INSTDIR\Data\user" "$INSTDIR\Data\.rednotebook"
  4.         ${ConfigWrite} "$INSTDIR\Data\.rednotebook\configuration.cfg" "dataDir=" "$INSTDIR\Data\.rednotebook\data" $R0
  5.     ${EndIf}
  6.     ${If} ${FileExists} "$INSTDIR\Data\.rednotebook\*.*"
  7.     ${AndIfNot} ${FileExists} "$INSTDIR\Data\usersettings\*.*"
  8.         CreateDirectory "$INSTDIR\Data\usersettings"
  9.         Rename "$INSTDIR\Data\.rednotebook\templates" "$INSTDIR\Data\usersettings\templates"
  10.         Rename "$INSTDIR\Data\.rednotebook\tmp" "$INSTDIR\Data\usersettings\tmp"
  11.         Rename "$INSTDIR\Data\.rednotebook\configuration.cfg" "$INSTDIR\Data\usersettings\configuration.cfg"
  12.         Rename "$INSTDIR\Data\.rednotebook\rednotebook.log" "$INSTDIR\Data\usersettings\rednotebook.log"
  13.         CopyFiles /SILENT "$INSTDIR\Data\.rednotebook\data\*.*" "$INSTDIR\Data\usersettings\data"
  14.         RMDir /r "$INSTDIR\Data\.rednotebook"
  15.         ${ConfigWrite} "$INSTDIR\Data\usersettings\configuration.cfg" "dataDir=" "../../Data/usersettings/data" $R0
  16.     ${EndIf}
  17.     ${If} ${FileExists} "$INSTDIR\Data\.rednotebook\*.*"
  18.     ${AndIf} ${FileExists} "$INSTDIR\Data\usersettings\*.*"
  19.         CopyFiles /SILENT "$INSTDIR\Data\.rednotebook\data\*.*" "$INSTDIR\Data\usersettings\data"
  20.         RMDir /r "$INSTDIR\Data\.rednotebook"
  21.         ${ConfigWrite} "$INSTDIR\Data\usersettings\configuration.cfg" "dataDir=" "../../Data/usersettings/data" $R0
  22.     ${EndIf}
  23. !macroend
RAW Paste Data