<?lc LiveCode scripts are working as expected. ?>
However I'm trying to execute the Shell Command but it just won't execute as far as I can tell.
Any help would be greatly appreciated.
Code: Select all
<html>
<br> Test 10 <br><br>
<?lc
set the errorMode to "inline" -- verbose error reporting in LiveCode server
-- inline - Indicates that errors should be output to the browser.
-- stderr - Specifies that the error should be written out to stderr.
-- quiet - Indicates that nothing is output anywhere when an error occurs.
-- debugger - For information only and indicates that the script is being run in 'remote debug' mode. This is only relevant to the on-rev engine.
if there is a file "MyApp.exe" then
put "<br><br>MyApp.exe - file exists<br><br>"
end if
if there is a file "C:\MyApp.exe" then
put "<br><br>C:\MyApp.exe - file exists<br><br>"
end if
set the defaultFolder to "C:\"
put "MyApp.exe MyUserID MyPW" into tCommand
-- set hideConsoleWindows to true
put tCommand
put "<br><br>"
-- generates C:\myUID.xml
-- PUT Shell(tCommand) -- PUT Shell(tCommand) - DOES NOT WORK
-- PUT Shell - Places a value into a container.
-- but - since the MyApptake a few seconds to run
-- this command returns an immediate error:
-- Error Occured: Access to the path 'C:\MyUerID.xml' is denied.
-- So better to use the GET command
GET Shell(tCommand) -- PUT - puts the results into the IT variable
put "<br><br>*** Command Completed ***<br><br>"
-- Put the shortname of the target -- test to display errors
?>
</html>
This works in my WindowsXP32bit standalone executable
but NOT with Start Using Stack (no controls just script in OpenStack):
Code: Select all
...
set the defaultFolder to "C:\"
put "MyApp.exe MyUserID MyPW" into tCommand
set hideConsoleWindows to true
Get Shell(tCommand)
...