New
#1
Delate, rename through batch files?
Hi all,
So I'm trying to make a personal shortcut on my computer to change a password using the shiftkeys .exe (C:\Windows\System32\sethc.exe) which can be done from setup. I'm looking to design this because I frequently deal with friends and family who have forgotten passwords, as well as my purchasing used computers. I want to automate the process, but I've hit a problem, which is making the batch file remove itself.
Here's the problem. I have a .exe file replace sethc.exe, with sethc.exe renamed to sethc.exe. I'm using the following lines
The batch file deletes itself successfully (del %0), but it's completely failing at the removal of the .exe and the renaming. I've tried changing the targeting, checking the syntax, but as far as I can tell, everything checks out, yet it still fails.Code:del sethc.exe ren sethc2.exe sethc.exe del %0
Any ideas?