get shell(xxx) not working? - Resolved
Posted: Thu Aug 03, 2017 1:17 pm
Hi,
I am using V8.1.6 of the community server and have come across an issue which I am not sure if it is a bug or the way that I am trying to use a built-in function.
I have used Windows Desktop Community V8.1.6 to create a .livecode stack with a number of functions and commands in it. I test the functions using the desktop stack by emulating the way they are to be called from a .lc web page so I know that they work as expected.
I have then written a number of .lc files a access them successfully via a browser. I use a number of JavaScript functions to call (using Get) and run functions and then display the returned data. Generally I have had no problem doing whatever I want to and using stacks to access data in MySQL databases manipulate the results and return formatted data to the web page for display.
However, I have found that using "get Shell(cscript.exe //nologo C:/xampp/htdocs/1234510087403.vbs)" causes an error. (the .vbs is fine as it tests OK from the command line and using the desktop IDE)
Testing via the desktop IDE works just fine but when called from a .lc page the result is...
stack "C:/xampp/Stacks/ServiceStacks/xyz.rev"
row 97, col 1: shell: can't run shell command ( /C "cscript.exe //nologo C:/xampp/htdocs/1234510087403.vbs")
row 97, col 1: shell: can't run shell command (cscript.exe //nologo C:/xampp/htdocs/1234510087403.vbs)
row 97, col 1: put: error in expression
I have also had a similar issue with using revCopyFile to work. Worked fine in the IDE but via a .lc page it returned an error (handler could not be found). But I managed to find a way around by using "put URL "binfile:path1/xxx1.xxx" into URL "binfile:path2/xxx2.xxx" which worked fine.
I have used exactly this same approach using the "get shell(cscript.exe //nologo C:/xampp/htdocs/xyz.vbs) about 3 years ago without a problem. unfortunately I don't know what version of the server I used back then.
Can anyone else replicate the issue or confirm that it must be an issue with my implementation?
All help appreciates.
Regards - Martin
I am using V8.1.6 of the community server and have come across an issue which I am not sure if it is a bug or the way that I am trying to use a built-in function.
I have used Windows Desktop Community V8.1.6 to create a .livecode stack with a number of functions and commands in it. I test the functions using the desktop stack by emulating the way they are to be called from a .lc web page so I know that they work as expected.
I have then written a number of .lc files a access them successfully via a browser. I use a number of JavaScript functions to call (using Get) and run functions and then display the returned data. Generally I have had no problem doing whatever I want to and using stacks to access data in MySQL databases manipulate the results and return formatted data to the web page for display.
However, I have found that using "get Shell(cscript.exe //nologo C:/xampp/htdocs/1234510087403.vbs)" causes an error. (the .vbs is fine as it tests OK from the command line and using the desktop IDE)
Testing via the desktop IDE works just fine but when called from a .lc page the result is...
stack "C:/xampp/Stacks/ServiceStacks/xyz.rev"
row 97, col 1: shell: can't run shell command ( /C "cscript.exe //nologo C:/xampp/htdocs/1234510087403.vbs")
row 97, col 1: shell: can't run shell command (cscript.exe //nologo C:/xampp/htdocs/1234510087403.vbs)
row 97, col 1: put: error in expression
I have also had a similar issue with using revCopyFile to work. Worked fine in the IDE but via a .lc page it returned an error (handler could not be found). But I managed to find a way around by using "put URL "binfile:path1/xxx1.xxx" into URL "binfile:path2/xxx2.xxx" which worked fine.
I have used exactly this same approach using the "get shell(cscript.exe //nologo C:/xampp/htdocs/xyz.vbs) about 3 years ago without a problem. unfortunately I don't know what version of the server I used back then.
Can anyone else replicate the issue or confirm that it must be an issue with my implementation?
All help appreciates.
Regards - Martin