Hi. You’ve posted your question in a forum that is for beginners trying to learn the basics of Photoshop. I'm moving your question to the Photoshop General Discussion forum for specialized attention to your situation.
You need to provide system info and other details. These kinds of errors usualyl indicate some sort of permissions problem where files cannot be accessed or the script cannot draw dialogs.