is this vbscript?
have you set retval to 0 prior to looking up the task?
if not vbscript, which datatype are you declaring it as (integer will cause problems)?
Is this Standard or Advanced?
what path are you using in the oPVX.Init method (client or server)?
Regarding the error, error 90 can indicate ""class definition not found"". Which might mean you are using the client or workstation's MAS90\Home directory.
Here is my preferred method of initializing providex session using vbscript.
-------------------------------------------------------------------------------------------------
Dim oShell : Set oShell = CreateObject(""WScript.Shell"")
Dim sPath : sPath = """" : sPath = oShell.RegRead(""HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\SOTAMAS90\Directory"")
Dim oPVXSession : Set oPVXSession = CreateObject (""ProvideX.Script"")
oPVXSession.Init(sPath & ""\Home"")
-------------------------------------------------------------------------------------------------