I ran a .bat
file as an administrator. The .bat
file said to copy all .dll
files from the current directory to the syswow64
directory. Something like:
copy *.dll c:\windows\syswow64
Unfortunately, running it as an administrator set the current directory to c:\windows\system32
rather than the directory that the .bat
file was in, so it caused .dll
files in system32
to be copied to syswow64
. The output showed lots of .dll
filenames, but also a lot of Access Denied.
s. I terminated the batch as soon as I noticed it was copying something other than the 7 files I had intended to copy.
Is this harmless for that station, or is it problematic? Is there a way to restore the syswow64
folder, or should I not bother? Is there even a way to tell if any .dll
files have been affected?
%~dp0
will give you the current drive and path.%~d0
will give you just the current drive, you can add\specific\path
to that. You can also use%CD%
and you will get the current directory, similar to%~dp0
except%CD%
can be used in batch files or directly in the CMD prompt whereas%~dp0
variables are a.bat
feature.cd /d c:\windows
then on the next lineecho %~dp0
%0
" though.... I know what each of those envars do seeing as how I've used them dozens of times... am I missing/misunderstanding something? My descriptive phrasing may be off, for sure. However I was trying more to describe the application of the envars rather than the nuances.