I am New to Powershell.I have a vbs File that will read the data from excel sheet,then load the same into oracle database and then it will call the bat file to submit a server Job(Siebel).Till now i am executing this vba file by calling from a bat script as shown below.
Call %windir%\SysWoW64\wscript.exe %VBSFILELOC%%VBSFILENAME% %VBSARG% %LOGDIR%.
Now when i tried to call the same from Poweshell,
cscript.exe arg1 arg2 arg3
vba file is error out at the following step in vba file
Set oSH = CreateObject(“WScript.Shell”)
EIMBase = sRootDir & "prog\eimjob8.cmd " & SetEnvFile & " "
sResult = oSH.Run(EIMBase & sIFBFile, 1, 1)
The sResult is getting with value as ‘591887’
Could you please help out whats going wrong when i am calling this from Powershell.
The same file when i am running directly/through bat script,there was no error.