Jump to content

ObjGet throwing error


Recommended Posts

So I'm trying to do some as400 automation and hit a wall when trying to get a COM object. The code on line 8 is failing, the as400.ws file opens with PCSWS.exe so I tried using that as the file path too but that didn't work either. Any and all help is greatly appreciated! 


$file = "C:\Users\Rhidlor\Desktop\as400.ws"

If Not FileExists($file) Then
   MsgBox(0, "Error", "Error finding file")

$object = ObjGet($file)

If @error Then
   MsgBox(0, "Error", "Error getting object")



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...