The VPatchFile macro in NSIS\Include\VPatchLib.nsh does not handle spaces or absolute paths. Suggest changing it to the following:
!macro VPatchFile PATCHDATA SOURCEFILE TEMPFILE
InitPluginsDir
File "/oname=$PLUGINSDIR\${TEMPFILE}.patchFile" "${PATCHDATA}"
vpatch::vpatchfile "$PLUGINSDIR\${TEMPFILE}.patchFile" "${SOURCEFILE}" "${TEMPFILE}"
Pop $1
DetailPrint $1
StrCpy $1 $1 2
StrCmp $1 "OK" +2
SetErrors
IfFileExists "${TEMPFILE}" +1 +3
Delete "${SOURCEFILE}"
Rename /REBOOTOK "${TEMPFILE}" "${SOURCEFILE}"
Delete "$PLUGINSDIR\${TEMPFILE}.patchFile"
!macroend
Logged In: YES
user_id=584402
Originator: NO
Thanks, fixed. I've also updated it to retain the old content of the registers it uses, look nicer thanks to LogicLib and added macro variable safety.
Let me know if my version is causing any more trouble:
http://nsis.svn.sourceforge.net/viewvc/nsis/NSIS/trunk/Contrib/VPatch/VPatchLib.nsh?revision=5366&view=markup