Oh dear... don't go there. We have a lot of SAD (SysAdmin by Decree) people on this board. Deal with it.

Lonkero makes some good points but unlikely that is the solution. If your script works after logon but not during then you have other issues.

I suggest you try debugging the script to see where it fails.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.