Skip to content
⌘ NSIS Forum Archive

VPatchFile with space in path to file: failed

5 posts

within#

VPatchFile with space in path to file: failed

Hi there,

In order to update some files, I use VPatch to do this.

Unfortunately, the defined path for the original file to be replaced contains a space into it.
I did use "$0\Sources\XYZ\Source files\XYZ___X.C", but it fails in "making" the EXE from the nsi script.

within my script, it fails on this line:
  !insertmacro VPatchFile "PatchBX1.pat" "$0\Sources\XYZ\Source files\XYZ___X.C" "XYZ___X_NEW.C" 
Thanks for your help.

w
within#
none of the quotes worked, unfortunately.

I also tried to "trick" the script in using a define like ths:

!define SRC "Source files"

!insertmacro VPatchFile "PatchBX1.pat" "$0\Sources\XYZ\${SRC}\XYZ___X.C" "XYZ___X_NEW.C"
but didn't work either 🤪

it seems the VPatch macro does NOT support space in its parameters... Maybe someone has another idea...

Thanks in advance
MSG#


Also, why don't you use the vpatch plugin directly if the macro is still broken?