Alternate Command Processor on Windows

조회 수: 4 (최근 30일)
dpb
dpb 2018년 12월 22일
편집: Walter Roberson 2018년 12월 26일
Bad, bad, TMW! :)
Appears the shell commands under Windows don't pay any attention to what user COMSPEC is...one gets CMD.EXE irregardless...
>> !ver
Microsoft Windows [Version 6.1.7601]
>> shell=getenv('comspec')
shell =
'"C:\Program Files\JPSoft\TCMD22\tcc.exe"'
>> system(shell)
TCC 22.00.41 x64 Windows 7 [Version 6.1.7601]
...
[details elided]
...
C:\DBNonBusiness...paign\Financials> exit
ans =
0
>>
This makes using features of an enhanced command processor much more of pain than otherwise and is a kick in the teeth, particularly with the restrictions TMW has placed on wildcards, etc., in their implementation of dir, etc., etc., ... I've been stewing over this for 20 years and today was finally the boiling over point to complain... :)
  댓글 수: 3
Walter Roberson
Walter Roberson 2018년 12월 25일
편집: Walter Roberson 2018년 12월 26일
"MATLAB uses a shell program to execute the given command. It determines which shell program to use by checking environment variables on your system. MATLAB first checks the MATLAB_SHELL variable, and if either empty or not defined, then checks SHELL. If SHELL is also empty or not defined, MATLAB uses /bin/sh."
dpb
dpb 2018년 12월 26일
Thanks, Walter...as one would expect, unfortunately, setting either of those doesn't effect Windows.
At the moment I don't have a supported compiler installed other than the default C compiler and I'm so inept in C hate to even make the attempt at a .mex file...is there any "backdoor" to Win API to bypass the builtin DOS.M to spawn the shell, you think?
Mayhaps this is a Q? for Yair to ponder... :)

댓글을 달려면 로그인하십시오.

답변 (1개)

Salahuddin Bangash
Salahuddin Bangash 2018년 12월 23일
I was really unaware of it, we can access cmd using Matlab. Thanks.
.m files can be combined with anything. :) .
And Bro why you replaced CMD.exe mean upgraded to ("TCMD22\tcc.exe")?
  댓글 수: 2
dpb
dpb 2018년 12월 23일
편집: dpb 2018년 12월 23일
Salahuddin Bangash
Salahuddin Bangash 2018년 12월 23일
Got it ~Bro

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by