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)
相关问题
- xcopy include folder
- Batch file if string starts by
- Jenkins - cmd is not recognized
- Does specifying the encoding in javac yield the sa
- String Manipulation with case sensitivity
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- Extracting columns from text file using Perl one-l
- How can one batch file get the exit code of anothe
- Command line escaping single quote for PowerShell
- How to make jenkins fail at a failing windows batc
- Problems using start-process to call other powersh
- Python utilizing multiple processors
- Why do all Pre-build or Post-build events in Visua
I wrote another script to run my script (mybat.bat) from my version of cmd (mycmd.exe). I kept both the cmd.exe and mybat.bat in the same folder. I called this new script as 'runmybat.bat' and inside it I code:
cd /d %~dp0 start mycmd.exe /c mybat.bat
. Running this runmybat.bat will run mybat.bat under mycmd.exe -- task accomplished!!Open
C:\Windows\System32\cmd.exe
. In command prompt run the below command (In other words, invoke your version ofcmd.exe
providing it the*.bat
as argument or command to run)