Archive: Problem with Delete


Problem with Delete
I am trying to backup some files that my install clobbers, and then restore them on uninstall. In the main section (where all the files are added) I do a bunch of:

CopyFiles "$INSTDIR/my/dir/my.fil" "$INSTDIR/my/dir/my.fil.bak"

In the Uninstall section, I do a bunch of:

CopyFiles "$INSTDIR/my/dir/my.fil.bak" "$INSTDIR/my/dir/my.fil"
..
..

followed by:

Delete "$INSTDIR/my/dir/my.fil.bak"
..
..

After the install is done, the .bak files are all still there. The copies work, but the Deletes fail, even though the Deletes that uninstall the installed files work fine.

I tried putting "sleep 5000" between the copies and the deletes. I tried moving the deletes to the un.onUninstSuccess function. No luck.

Is this a known issue? Something silly I may be doing? I am using NSIS 2.46 on WinXP Pro.

Thanks,
Gridly


Check the paths with a MessageBox. Also I assume you're using backstrokes not forward strokes in your paths. This is Windows not Unix.

Stu


I was using the Unix style path separator. Old habits die hard. That seems to have fixed it. Odd that they work with CopyFiles, but not with Delete. I moved to the "copy->delete" model after Rename failed. Maybe that was the slashes too and it will work now.

Thanks for catching that. It was something silly I was doing after all.

Gridly