Windows DOS call from a routine
I have written an in network single web page containing a jquery datatable. I want to add the "href" tag to link the Terminal window based on the IP.
Below is a list of failed attempts to make this work.
W " <td><a href=""javascript:pass('"_PASS_"|"_IP_"|"_USER_"|"_PORT_"')"">Terminal</a></td>"
or
W " <td><a href=""javascript:openCMD('test')"">Terminal</a></td>"
or
W " <td><a href=""C:\\Cachesys\bin\cterm.exe /console=cn_iptcp:ip[23"">Terminal</a></td>"
W " function openCMD(ip) {"
W " var oShell = new window.ActiveXObject(""WScript.Shell"");"
W " oShell.Run(""dir *.*"");"
W " oShell.Run(""C:\\Cachesys\bin\cterm.exe /console=cn_iptcp:ip[23]"");"
W " };"
Please note that it is only within the network with no access to the outside. I am aslo aware that the ActiveXObject no longer works on IE.
Can anyone with expertise help with the problem, please?
Richard
Comments
Just to be clear, are you trying to run the OS-level command on the server, or on the client?
If you're trying to run it on the server, check the documentation for the $ZF -100 command.
If you're trying to run it on the client, you're going to run into all kinds of security issues, and for very good reasons.
Edit: just saw that you're on Cache 2013. You might have to use $ZF -1 instead of -100.
Hi,
this web page is on the client. Right now it is on my machine. this is not going to be deployed anywhere; it is simply a tool to access information across the Cache databases
I tried $zf and that works only for very simple command like $zf(-1,"dir *.*"). but it does not work some more complicated statements. I tried a javascript functions, but IE does not allow it, anymore.
there has to be a way to do this. No?
"here has to be a way to do this. No?"
well...no!