Automic Workload Automation

Expand all | Collapse all

Microsoft VBScript runtime error: ActiveX component can't create object

  • 1.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 26, 2017 07:58 AM
    hi all,
     
    i have a problem about execute vbs file on automic. I tried cscript and wscript tool with (WSH)

    C:\Windows\SysWOW64\cscript.exe C:\Users\olgun.ozmen\Desktop\scritps\samplecppp.vbs

    actually running on windows cmd is succesfully done but same script run on Automic , vbs file can't run. The error is ( Microsoft VBScript runtime error: ActiveX component can't create object)

    anyone knows how can run this vbs file on automic ? any suggestion about this runtime error ?

    Best.

    ===========================================================================================
    samplecppp.vbs inside 
    ===========================================================================================
    ' VBS Script Generated by CuteFTP (TM) macro recorder.
    ' Generated at: 24-May-17 10:58:16.

    ' Create TEConnection object
    Set MySite = CreateObject("CuteFTPPro.TEConnection")
    ' Rename local file
    MySite.LocalRename "C:\Users\olgun.ozmen\Desktop\deneme.txt", "C:\Users\olgun.ozmen\Desktop\vakifbank\deneme.txt"
    ===========================================================================================



    ===========================================================================================
    job report 
    ===========================================================================================

    c:\>C:\Automic\Agents\Windows\bin\UCXJWX6M.EXE JNR=0001006119 MNR=0010 PNR=2300 IPA=192.168.238.1 TYP=S TXT="        Job started" 
    Program 'UC4 Job Messenger' version '12.0.1+build.632' started
    UCMDJP: *********************************************************************
    UCMDJP: ** JOB 0001006119 (ProcID:0000001016) START AT 26.05.2017/14:40:15 **
    UCMDJP: **                                    UTC TIME 26.05.2017/11:40:15 **
    UCMDJP: *********************************************************************
    Connected with agent 'WIN01'
    Program 'UC4 Job Messenger' version '12.0.1+build.632' terminated normally

    c:\>C:\Windows\SysWOW64\cscript.exe C:\Users\olgun.ozmen\Desktop\scritps\samplecppp.vbs 
    Microsoft (R) Windows Script Host Version 5.812
    Copyright (C) Microsoft Corporation. All rights reserved.

    C:\Users\olgun.ozmen\Desktop\scritps\samplecppp.vbs(5, 1) Microsoft VBScript runtime error: ActiveX component can't create object: 'CuteFTPPro.TEConnection'


    c:\>C:\Automic\Agents\Windows\bin\UCXJWX6M.EXE JNR=0001006119 MNR=0010 PNR=2300 IPA=192.168.238.1 TYP=E RET=00000000 TXT="        Job ended" 
    Program 'UC4 Job Messenger' version '12.0.1+build.632' started
    UCMDJP: *********************************************************************
    UCMDJP: ** JOB 0001006119 (ProcID:0000001016) ENDED AT 26.05.2017/14:40:45 **
    UCMDJP: **                                    UTC TIME 26.05.2017/11:40:45 **
    UCMDJP: ** --------------------------------------------------------------- **
    UCMDJP: **                                    USED:      0.000 CPU         **
    UCMDJP: *********************************************************************
    Connected with agent 'WIN01'
    Program 'UC4 Job Messenger' version '12.0.1+build.632' terminated normally

    c:\>GOTO JOBENDE 
    ===========================================================================================


  • 2.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 26, 2017 08:29 AM
    As Automation Engine does not provide a graphical WIN console for job execution per default cscript commands will not get executed correctly.

    => use wscript instead.

    in general one can say:

    You can do everything via Automic WIN jobs that can be done with windows CMD console
    (with only some little exceptions)

    https://stackoverflow.com/questions/8678441/difference-between-wscript-and-cscript
    https://technet.microsoft.com/en-us/library/ee156585.aspx




  • 3.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 29, 2017 05:59 AM
    i tried wscript , job status active on activity tab but win job never ends :/  any suggestion ? 


  • 4.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 29, 2017 06:28 AM
    if you run the script on win console - do you get any output or return code?

    Possibly its necessary to define wscript as external interpreter (see powershell)


  • 5.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 29, 2017 07:38 AM
    samplecppp.vbs  --> samplecppp.vbs file is simple file transfer script, this file generated manually by CUTE FTP application for reason automate file transfer.

    i run on windows cmd 
    wscript C:\Users\olgun.ozmen\Desktop\scritps\samplecppp.vbs
    there are no output but succesfully done file transfer.

    but i execute on  automic , 
    win job never ends ,still active and no return code or reports!!

    finally i catch windows event wiever
    =============================================================================
    The server {112EA537-7AB9-4E22-8BFB-7FD5FCB19849} did not register with DCOM within the required timeout.
    =============================================================================



    =============================================================================
    {112EA537-7AB9-4E22-8BFB-7FD5FCB19849}  --> this registry by CuteFtp application
    =============================================================================
    Windows Registry Editor Version 5.00
     
    [HKEY_CURRENT_USER\Software\Classes\CuteFTPPro.TEConnection]
    @="TEConnection Class"
     
    [HKEY_CURRENT_USER\Software\Classes\CuteFTPPro.TEConnection\CLSID]
    @="{112EA537-7AB9-4e22-8BFB-7FD5FCB19849}"
     
    [HKEY_CURRENT_USER\Software\Classes\CuteFTPPro.TEConnection\CurVer]
    @="CuteFTPPro.TEConnection.9"
     
    [HKEY_CURRENT_USER\Software\Classes\CuteFTPPro.TEConnection.9]
    @="TEConnection Class"
     
    [HKEY_CURRENT_USER\Software\Classes\CuteFTPPro.TEConnection.9\CLSID]
    @="{112EA537-7AB9-4e22-8BFB-7FD5FCB19849}"
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{112EA537-7AB9-4e22-8BFB-7FD5FCB19849}]
    @="TEConnection Class"
    "AppID"="{DA15006A-FADA-495b-9A0C-EC2107E2FB9F}"
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{112EA537-7AB9-4e22-8BFB-7FD5FCB19849}\LocalServer32]
    @="\"C:\\Program Files (x86)\\GlobalSCAPE\\CuteFTP\\ftpte.exe\""
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{112EA537-7AB9-4e22-8BFB-7FD5FCB19849}\ProgID]
    @="CuteFTPPro.TEConnection.9"
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{112EA537-7AB9-4e22-8BFB-7FD5FCB19849}\Programmable]
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{112EA537-7AB9-4e22-8BFB-7FD5FCB19849}\TypeLib]
    @="{1B04F22B-5012-432d-8EA0-B57DD75EBF9D}"
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{112EA537-7AB9-4e22-8BFB-7FD5FCB19849}\VersionIndependentProgID]
    @="CuteFTPPro.TEConnection"
    =============================================================================




    this registry 


  • 6.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 29, 2017 07:56 AM
    hmmmm

    which user starts the WIN Agent?
    if its Local System Account (via SMGR) it could be the fact that not the comple user profile will be loaded as if its a "real" user.

    => if you start the agent with you user does it work then?


  • 7.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 29, 2017 09:46 AM
    i started system user 
    service manager dialog win agent inside --> log on as -- section is empty


  • 8.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 29, 2017 09:57 AM

    => if you start the agent with your user (domainuser) does it work then?


  • 9.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 30, 2017 10:59 AM
    i tried domainuser . job status active on activity tab but win job never ends .
    ====================================================================
    define interpreter  powershell.exe with ps1 and execute "C:\Windows\System32\wscript.exe C:\Users\olgun.ozmen\Desktop\scritps\samplecppp.vbs"

    VBScript runtime error: ActiveX component can't create object: 'CuteFTPPro.TEConnection'

    ====================================================================

    why i running on windows powershell or cmd manually succesfully done but on automic can't :/



  • 10.  Microsoft VBScript runtime error: ActiveX component can't create object



  • 11.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 31, 2017 04:52 AM
    i tried .job ended but nothing happened

    ====================================================================
    process
    ====================================================================
    :BEGIN_EXT_INTERPRETERS powershell

    wscript.exe C:\Users\olgun.ozmen\Desktop\scritps\samplecppp.vbs

    :END_EXT_INTERPRETERS
    ====================================================================

    ====================================================================
    jobreport 
    ====================================================================
    20170531/114712.368 - U02001095 Job '1008138' requested task-specific ressource '10:INTERPRETER/EXT_INT_0001'.
    20170531/114712.415 - U02001097 Job '1008138' use task-specific ressource '10:INTERPRETER/EXT_INT_0001' - 'C:\Automic\Agents\Windows\Resources\0010\0001008138\0001008138_0001.ps1'.

    C:\Automic\Agents\Windows\bin>C:\Automic\Agents\Windows\bin\UCXJWX6M.EXE JNR=0001008138 MNR=0010 PNR=2300 IPA=192.168.238.1 TYP=S TXT="        Job started" 
    Program 'UC4 Job Messenger' version '12.0.1+build.632' started
    UCMDJP: *********************************************************************
    UCMDJP: ** JOB 0001008138 (ProcID:0000002800) START AT 31.05.2017/11:47:12 **
    UCMDJP: **                                    UTC TIME 31.05.2017/08:47:12 **
    UCMDJP: *********************************************************************
    Connected with agent 'WIN01'
    Program 'UC4 Job Messenger' version '12.0.1+build.632' terminated normally

    C:\Automic\Agents\Windows\bin>powershell.exe C:\Automic\Agents\Windows\Resources\0010\0001008138\0001008138_0001.ps1 

    C:\Automic\Agents\Windows\bin>C:\Automic\Agents\Windows\bin\UCXJWX6M.EXE JNR=0001008138 MNR=0010 PNR=2300 IPA=192.168.238.1 TYP=E RET=00000000 TXT="        Job ended" 
    Program 'UC4 Job Messenger' version '12.0.1+build.632' started
    UCMDJP: *********************************************************************
    UCMDJP: ** JOB 0001008138 (ProcID:0000002800) ENDED AT 31.05.2017/11:47:12 **
    UCMDJP: **                                    UTC TIME 31.05.2017/08:47:12 **
    UCMDJP: ** --------------------------------------------------------------- **
    UCMDJP: **                                    USED:      0.000 CPU         **
    UCMDJP: *********************************************************************
    Connected with agent 'WIN01'
    Program 'UC4 Job Messenger' version '12.0.1+build.632' terminated normally

    C:\Automic\Agents\Windows\bin>GOTO JOBENDE 
    ====================================================================


    ====================================================================
    activation 
    ====================================================================
    2017-05-31 12:47:12 - U00029006 File 'C:\Automic\Agents\Windows\TEMP\OAACFJIO.TXT' cannot be deleted, error code '32', error description: '32 - The process cannot access the file because it is being used by another process.'.
    ====================================================================




  • 12.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted May 31, 2017 05:48 AM
    Does your script - when running on console - pop up any Windows or comments to react on?


  • 13.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted Jun 02, 2017 03:17 AM
    hi ,

    i tried the ps1 file inside call to the vbs file with parameters. i used cscript.
    Somehow different user with the same rights can succesfully done but another user (these are same privileges rights) can't (activex error).

    i think Windows Script Host(WSH) has a special permission to do it but i can't find where it is ? 
    for now i use different user but this is workaround solution.

    thanks.


    ====================================================================
    deneme.ps1 file 
    ====================================================================
    Param($getFileFrom, $putFileTo)

    $ErrorActionPreference = "stop"
    try{     
    Invoke-Command -ScriptBlock {
        param($getFileFrom ,$putFileTo) 
        cmd /c "cscript C:\Users\olgun.ozmen\Desktop\scritps\samplecppp2.vbs $getFileFrom $putFileTo"    
        } -ArgumentList $getFileFrom ,$putFileTo
    }
    Catch{
        $_.Exception.Message
        $Host.SetShouldExit(1)
    }
    ====================================================================

    ====================================================================
    samplecppp2.vbs file
    ====================================================================
    ' VBS Script Generated by CuteFTP (TM) macro recorder.
    ' Generated at: 24-May-17 10:58:16.

    ' Create TEConnection object
    Set MySite = CreateObject("CuteFTPPro.TEConnection")
    ' Rename local file
    MySite.LocalRename WScript.Arguments(0), WScript.Arguments(1)
    ====================================================================

    ====================================================================
    cmd
    ====================================================================
    powershell -c "C:\Users\olgun.ozmen\Desktop\bm\deneme.ps1 'C:\Users\olgun.ozmen\Desktop\deneme.txt' 'C:\Users\olgun.ozmen\Desktop\vaf\deneme.txt'"
    ====================================================================







  • 14.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted Jun 02, 2017 10:31 AM
    you ´re welcome :-)

    sry no idea what here could be the error :-(


  • 15.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted Jun 13, 2017 04:17 AM
    Hi Wolfgang,

    Now we are getting same error for all users. We can  execute this command from cmd succesfully.
    However, we can take same below error from Automic.

    ERROR:
    VBScript runtime error: ActiveX component can't create object: 'CuteFTPPro.TEConnection'

    Windows Command:
    powershell -c "C:\Users\olgun.ozmen\Desktop\bm\deneme.ps1 'C:\Users\olgun.ozmen\Desktop\deneme.txt' 'C:\Users\olgun.ozmen\Desktop\vaf\deneme.txt'"


  • 16.  Microsoft VBScript runtime error: ActiveX component can't create object

    Posted Jun 19, 2017 04:43 AM
    i found another explanation different forums:
    =======================================================================================
    Found the difference  the ftpte process was still running on Server A. Careful though - if using like named logins and passwords to help continuity make sure you tick the 'Show processes from all users' tick box in Task manager as the process will NOT show if userid is the same (becuase it is a different user sesssion)
     
    The ftpte process is created when you create the CuteFTPPro object.  The reason this might still be there, is if the vbs script does not properly finish and/or prematurely ends before the object is closed.
     
    So the 'moral' of the story is....
    ActiveX error means you need kill the ftpte.exe process and sort your vbs script out / put appropriate error checking in.
    =======================================================================================
    and another solution for a some users
    give authorized username and pass component service  on identitiy section 
    wqkxvbif9bhy.pnghttps://us.v-cdn.net/5019921/uploads/editor/ab/wqkxvbif9bhy.png" width="1114">

    =======================================================================================