1

I have a test.bat and a copy of cmd.exe (rename cmdnew.exe), both in a same folder.

Question: How can i run test.bat with a specific "cmdnew.exe" (not with cmd.exe)? (how can i register the new path of shell cmdnew.exe)

To be considered:

  1. I need to associate batch (.bat) file with the new cmdnew.exe

  2. The cause of this question is because cmd.exe, regedit.exe and another GUI windows tools, "missing" from my Windows OS (not reason, and not related to the question). However, I must clarify that when I use the term "missing" it means that Windows does not find them, but applications are correctly listed in their directory. And if I try to manually run cmd.exe (from windows/system32) get the same message that: the operating system can not find cmd.exe

  3. I need tu run my .bat with administrative privileges to fix the problems with my OS

  4. I copied the new "cmdnew.exe" console to the Windows/system32 route, but when I opened is locked the command prompt (The command prompt has been disabled by your administrator. Press any key to continue...). And I can not change this restriction because applications "gpedit.msc" and "regedit.exe" are also "missing". In addition, this message should not go out because it is a local computer and the account has administrator privileges

Update: Jul 09

  1. It is in personal computer and an administrative account. It is not connected to any network. Win 7 SP1 x64 OS. It is possible that this damage has been caused by malware; i'm not sure and neither is related to the question. Currently no presence of malware on the PC.

Thanks

  • 1
    Adding a copy of cmd.exe isn't going to sovle your actual problem, your system is corrupt, which means you should solve that problem first. – Ramhound Jul 7 '16 at 22:52
  • You are right. My system is corrupt. But i have a .bat to solve this problems, but i need to run, and i can't, because cmd.exe is missing. So i have a copy of cmd.exe in another path. thanks – BrianC Jul 7 '16 at 23:03
  • Repair the OS so it works as it is suppose so SFC /SCANNOW from elevated command prompt perhaps to potentially resolve with a simple fix if so but won't know unless you try. – Pimp Juice IT Jul 7 '16 at 23:03
  • Already I tried that solution and reached 100% and did not notice anything – BrianC Jul 7 '16 at 23:04
  • Can you do a START cmdnew.exe /k "<batch logic>" command and run logic with it that way? – Pimp Juice IT Jul 8 '16 at 0:24
0

In Start Run you can type:

c:\your\complete\path\cmdnew.exe /c c:\your\complete\path\the.bat
| improve this answer | |
  • doesn't work in this way – BrianC Jul 8 '16 at 0:37
  • In addition, for the .bat work I run it with administrative privileges – BrianC Jul 8 '16 at 0:38
  • Can you add any info on how/why you expect this to work Emilio? – Andi Mohr Jul 8 '16 at 10:48
  • Hi andy. I update the question – BrianC Jul 8 '16 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.