如何在cmd.exe的单独实例中运行批处理脚本 [英] How to run a batch script in a separate instance of cmd.exe

查看:220
本文介绍了如何在cmd.exe的单独实例中运行批处理脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我运行bat文件,它将在系统的cmd.exe上运行.我希望我的批处理脚本使用我的cmd.exe版本,而不要使用C:\ Windows \ System32下的默认版本(它可能会被受感染计算机上的坏人篡改)

If I run my bat file, it runs on system's cmd.exe. I want my batch script to use my version of cmd.exe and not the defualt one which is under C:\Windows\System32 (which might be tampered by the bad guy on a compromised machine)

推荐答案

打开C:\Windows\System32\cmd.exe.在命令提示符下,运行以下命令(换句话说,调用您的cmd.exe版本,并为其提供*.bat作为参数或要运行的命令)

Open C:\Windows\System32\cmd.exe. In command prompt run the below command (In other words, invoke your version of cmd.exe providing it the *.bat as argument or command to run)

Folder:\path\your_version_cmd.exe folder:\path\your_bat_file.bat

这篇关于如何在cmd.exe的单独实例中运行批处理脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆