Why can't I use my own ftp.exe?

2

I've been trying to configure FTP in Emacs22 on Windows XP, and I read here that the Windows ftp program wasn't up to scratch, and to replace it with this GNU one. That worked fine on my home computer, but on my work computer, if I put the new ftp.exe in System32, overwriting the old one, Windows instantly and silently replaces my version with its original version. Is there a way to stop this behaviour?

Skilldrick

Posted 2009-07-28T08:41:37.917

Reputation: 1 547

Answers

7

This feature is called Windows File Protection.

You have to replace the file in the directory %systemroot%\system32\dllcache also, as far as I remember, but try on your own risk.

Manuel Faux

Posted 2009-07-28T08:41:37.917

Reputation: 936

4Might be easier to just rename your ftp.exe to something else – nik – 2009-07-28T08:54:12.760

5Please, don't run around replacing random system files. You can put it elsewhere and name it differently. – Joey – 2009-07-28T09:39:24.290

Of cause: It is generally better to not modify the system files of your operating system, but I think there is no method how to do this without modifying any system files and he/she wanted to know a solution how to bypass this feature. – Manuel Faux – 2009-07-28T09:53:12.250

Manuel: One can always solve the problem by modifying the PATH environment variable for a single process. – Joey – 2009-07-28T12:46:41.747

1A better solution would be to place the ftp client somewhere else then add it's location to the system path environment variable. If its entry is before the system32 Windows will find a run it first. – Kenneth Cochran – 2009-07-28T12:47:03.993

1@Kenneth - this is actually the solution I came to in the end, but I didn't like the idea of having my own path before Windows' for some reason. – Skilldrick – 2009-07-28T14:41:55.883

3

Can't you just change what program Emacs calls?

M-x customize-variable RET ange-ftp-ftp-program-name RET

Or add this to your .emacs:

(setq 'ange-ftp-ftp-program-name "my-ftp")

Teddy

Posted 2009-07-28T08:41:37.917

Reputation: 5 504