You could split your problem into a server script and a client script. Let your server script create and maintain the COM object while your client scripts could communicate with it via message queues (see the msgctl, msgget, msgrcv and msgsnd functions).