You are here

[DirectoriesToPreserve] Don't work for me

2 posts / 0 new
Last post
Makazzz's picture
Last seen: 2 years 2 months ago
Joined: 2019-04-30 15:58
[DirectoriesToPreserve] Don't work for me

Error picture
I tried at least 100 times for a solution but nothing seem to work... I am working on VSCode Portable online install without command line but with portable mode. I tried to copy the directory of App\VSCode\data with a custom code after install for not having it in the paf.exe directly and because it will try to replace it but same thing happen. I don't know what to do anymore and moving the data folder around is not a solution (I tried) and remove the purpose of not using command line. Even using the "Rename" command (for moving directory around) with nsh custom code break the data folder or do nothing.

installer.ini | This is for download and preserve the data folder but the [DirectoriesToPreserve] is not preserving the data but "try to open it" like a file (see Error picture) and every data is gone.
DownloadName=Visual Studio Code - Latest 32bit
;Download2Name=Visual Studio Code - Latest 64bit


PortableApps.comInstallerCustom.nsh | This will copy the data folder from bin to VSCode after the first install.
Var CustomFirstRunDone
!macro CustomCodePreInstall
ReadINIStr $0 "$INSTDIR\Data\settings\VSCodePortableFirstRun.ini" "FirstRun" "Done"
${If} $0 != true
StrCpy $CustomFirstRunDone true
!macro CustomCodePostInstall
${If} $CustomFirstRunDone == true
CreateDirectory $INSTDIR\Data\settings
CopyFiles /SILENT $INSTDIR\App\DefaultData\Readme.txt $INSTDIR\Data
CopyFiles /SILENT $INSTDIR\App\bin\*.* $INSTDIR\App\VSCode
WriteINIStr "$INSTDIR\Data\settings\VSCodePortableFirstRun.ini" "FirstRun" "Done" "true"

Any help will be appriciated thanks.

EDIT: Finally I used command line argurment and not the portable mode anymore. So the problem still exist.

Last seen: 23 min 24 sec ago
Joined: 2012-01-03 09:23

I encountered this error message a couple of times too.

It's really weird that it tries to overwrite files that are deleted before.

To be save you should add the option:

Log in or register to post comments