How to run bat files remotely [KSC for Windows]
This article is about Kaspersky Security Center for Windows (KSC for Windows)
In this article we will share the steps on how run a .bat file remotely through Kaspersky Security Center (KSC).
How to execute a batch file on the remote hosts
-
Create an installation package based on a file
- Create a remote installation task for that Installation package
- Assign the task to a target hosts and start it
During task execution NAgent will run the file using a 32-bit cmd.exe process (C:\Windows\SysWOW64\cmd.exe) under LocalSystem account.
Limitations
Some commands and programs
- Do not support execution under LocalSystem account.
- Are not recognized as internal (external) for 32-bit cmd, thus can not be started from 32-bit cmd.exe process.
How to execute batch file using 64-bit cmd.exe process:
- Add symbolic link to 64-bit cmd.exe in the script
-
Run all cmdlets using this symlink
Example
REM the following creates symlink named cmdin64.exe to C:\Windows\System32\cmd.exe
cmd.exe /c mklink cmdin64.exe "C:\Windows\System32\cmd.exe"
REM next line starts uwfmgr.exe with , which is not recognized as internal or external for 32-bit cmd.exe
cmdin64.exe /c uwfmgr.exe
|
Using x64 versions of commands.
For example, to import .reg file you need to create the following bat file:
Example
echo off
reg add <reg file> /reg: 64
|
You can find x64 versions of the commands online.
0 Comments
Recommended Comments
There are no comments to display.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now