I am trying to run a vb script using ssh hook in airflow. When I try to run the same cscript vb script command on windows command prompt it works fine. but when i try to run it from airflow which is doing ssh to same windows machine I get below null error:
vbs(8, 1) (null): 0x80131509
It is same if i try to run this in linux using ssh to windows..
Here's my vbs script
Option Explicit
Dim Env
Env = WScript.Arguments(0)
Dim xlapp, xlworkbook
set xlapp = CreateObject("Excel.Application")
xlapp.Application.DisplayAlerts = False
set xlworkbook = xlapp.workbooks.Open("\\ab\cd\xyz.xlsm",,True,,,,,,,,False)
xlworkbook.Application.Run "Sheet1.MyData", Env
Dim w
For Each w In xlapp.Application.Workbooks
w.Close False
Next
xlapp.Application.Quit
Running it with below command-
cscript myscript.vbs dev
Not sure if something wrong with running cscript via ssh
User contributions licensed under CC BY-SA 3.0