So just to understand what you are saying.
The script works fine locally, but over the SDN it doesnt work properly.
When on the SDN does the script load up and start/load gui ok?
How far does the script actualy make it before it doesnt work?
By the sound of it, you are saying that the script loads up and you are able to start it, but then it doesnt do anything when it should be running?