Sergi Vaque · Feb 3, 2022


Could be enabled a service as "%service_telnet" from cmd? I need to open a cache terminal from cmd but without this service enabled it is not possible, I mean avoiding the use of manage portal of course.

0 264
Discussion (5)2
Log in or sign up to continue

Hi Vic, thanks for you previuos answer!

I need to open a cache terminal from a .bat or executable file, but when %Service_Telnet is disabled it is not possible. I am triying to avoid the manual step of openning a manager portal and looking forward finding to another option as do it from cmd.

I'm not sure how exactly you are planning to connect or set up these machines. If your requirement is to avoid the SMP and you can use csession to access terminal, you can use ^SECURITY or Security.Services methods to modify the services. Perhaps those are of use to you?

At the moment I've solved it using console=cn_ap... instead of console=cn_iptcp..

So the code is sth like:

if exist "..\Cterm.exe" ( ..\Cterm.exe /console=cn_ap:[InstanceName] .\asd.scr )

when I was using..

if exist "..\Cterm.exe" ( ..\Cterm.exe /console=cn_ap:[23] .\asd.scr )

If you are trying to run arbitrary code from a Windows .BAT file, the following almost works:

ECHO ZN "%%SYS" DO ^^^^SECURITY HALT | C:\InterSystems\Cache\bin\cache.exe -s C:\InterSystems\Cache\mgr

The limitations are:

  • You have to specify the locations of the Caché or IRIS executable and the \mgr directory with an -s option.
  • One cannot redirect command input from the terminal, so what you run can't be interactive.
  • Quoting for Windows may annoy you.