Posted By

kenray on 11/22/08


Shell UNC

Versions (?)


 / Published in: Revolution

This is a wrapper to the shell() function to make sure it takes care of things like hiding console windows, dealing with UNC, etc. NOTE: This is a work-in-progress and will likely be updated periodically.

  1. function stsShell pCmd
  2. set the hideConsoleWindows to true
  3. switch (the platform)
  4. case "MacOS"
  5. case "Linux"
  6. put shell(pCmd) into tResult
  7. break
  8. case "Win32"
  9. -- adjust the defaultFolder to avoid UNC error messages (thanks to Trevor for the tip)
  10. put the defaultFolder into tOldFolder
  11. set the defaultFolder to "C:\"
  12. put shell(pCmd) into tResult
  13. set the defaultFolder to tOldFolder
  14. break
  15. end switch
  16. return tResult
  17. end stsShell

Report this snippet  


RSS Icon Subscribe to comments
Posted By: kenray on November 22, 2008

The "switch the defaultFolder" fix from Trevor DeVore can be found here:

Posted By: kenray on November 22, 2008

You need to login to post a comment.