Elmer BeFuddled
Resident eejit
- Joined
- Jun 12, 2010
- Messages
- 1,048
- Reaction score
- 251
I'm trying to write a batch file that will:-
a) Take full ownership
b) Rename original file
c) Copy replacement file from point A (different) to the original locations (system 32 and SysWOW64 involved here)
The story so far:-
N.B. The space at the start of the folder called " Modifying" (its an "Alt+ 160) is deliberate, not a typo.
I've made a mock up so I'm assuming the first two (takeown & cacls) are working.
Update, Appears not!! The rename bit works no problem. It's the copying of the replacement file that's not happening for me
This is to automate (eventually!) the changing of my imageres.dll file and another three or four system files I've modified and always change. Thus speeding up a pretty fast routine I've already got (by hand).
Help appreciated.
Update, Appears not!! Tried on a system file, didn't work. Looks like I need to start from scratch .
a) Take full ownership
b) Rename original file
c) Copy replacement file from point A (different) to the original locations (system 32 and SysWOW64 involved here)
The story so far:-
Code:
@echo off
takeown /f C:\Windows\System32\Elmers.rtf
cacls C:\Windows\System32\Elmers.rtf
REN C:\Windows\System32\Elmers.rtf Elmers0ld.rtf
COPY "D:\ MODIFYING\7 DLL+ W.I.P.s\Elmers.rtf" "C:\Windows\System32\Elmers.rtf"
I've made a mock up so I'm assuming the first two (takeown & cacls) are working.
Update, Appears not!! The rename bit works no problem. It's the copying of the replacement file that's not happening for me
This is to automate (eventually!) the changing of my imageres.dll file and another three or four system files I've modified and always change. Thus speeding up a pretty fast routine I've already got (by hand).
Help appreciated.
Update, Appears not!! Tried on a system file, didn't work. Looks like I need to start from scratch .
Last edited: