user710818
user710818

Reputation: 24248

Substitute windows cmd

I found PowerCmd. And would like to substiture cmd - as default IDE for execution of bat files. But simple replacin of comspec do nothing. I cann't also rename cmd.exe in %SYSTEM32%. Is possible to substiture or not? Thanks.

Upvotes: 0

Views: 351

Answers (1)

manojlds
manojlds

Reputation: 301037

I am giving answer for Powershell, should be similar for anything else that you want to use:

Use Regedit and goto

HKEY_CLASSES_ROOT\batfile\shell\open\command

Set the default value to

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit "%1" %*

Now when you double click on any batch file, it should run on powershell. -noexit gets to the powershell prompt after completion of the batch file.

Upvotes: 2

Related Questions