Hello,
I have a script that uses PSEXEC to launch processes on several of our remote servers. It has been working great for some time now. However, our corporate virus scanner is picking up PSEXEC as a virus and promptly deletes this file every day. The network admins wont add this to the allowed list as it is used by the conflicker worm and several others. To get around this i have a batch file that checks to see of psexec is in the windows/system32 folder and if not it copies it there. I would like to incorporate this into my auto IT code so when I execute the script it will check and copy the file if necessary. could someone please help me with this?
Here is my batch file code:
@ECHO OFF
c:
IF EXIST %windir%\system32\pskill.exe GOTO :next
copy "\\path\PsTools\pskill.exe" %windir%\system32\pskill.exe
:next
IF EXIST %windir%\system32\psexec.exe GOTO :end
copy "\\path\psexec.exe" %windir%\system32\psexec.exe
:end
Thanks