Not an answer to your problem, but something to help you find out what the actual problem is. Your code has the wonderful line
On Error Resume Next
which suppresses the script from stopping at the point of failure; and allows you to do error handling for the error, by utilizing the properties of
Your code however is not utilizing Err
and therefore you are not learning what the problem is. I would be tempted to comment out On Error Resume Next
and then try the program out to see if and what any errors are.
vbscript - What does the "On Error Resume Next" statement do? - Stack Overflow
On Error Statement - Visual Basic | Microsoft Docs