Windows script file- Microsoft JScript runtime error: Type mismatch

601 Views Asked by At

I am trying to run a "pre-built" .wsf file which seems to work perfectly fine for my colleagues. But, I seem to be getting the error:

"D:\startup.wsf(221, 8) Microsoft JScript runtime error: Type mismatch"

var QXDM;
var PortNumber = -1;
//QXDM object was created using ""new ActiveXObject( "QXDM.Application" );""
//input received from user for PortNumber and parsed
PortNumber = WScript.Arguments( 0 );
if (PortNumber != -1)
   {
       // Change the port
       QXDM.COMPort= PortNumber;  ///////LINE:221 ERROR HERE
   }

Please advice.

Thanks.

0

There are 0 best solutions below