Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


osirisja
2011-08-29T13:23:02Z
Hi All

Okay - I'm trying to call an external application using Powershell rather than Executing an external batch file. I am not very conversant with Powershell but I seem to get it working well enough to call the application and run it, however, if there is an error returned from the external application, I can't get the Powershell script to return the error back to VC.

Script sets some environment variables and then calls the executeable:
=====================
$env:ISIS_OMS_DOMAIN="-"
$env:ISIS_OMS_PORT="9091"
$env:ISIS_KEY_MODE="onlyoms"
$env:ISIS_COMMON="C:\isiscommv7"
$env:PATH=$env:PATH + ";" + $env:ISIS_COMMON +"\w3\lib"

$exe = "c:\isis_V72\pdew3700\pdew3.exe"
$rpj = "R:\ISIS_RES\docdef\VIPTemplates.prj"

iex "$exe $prj"
=====================

The PDEW3 exe is erroring but the VC job flags it as succesful when I need it to error. Anybody any suggestions?

Cheers

Andy
Sponsor
Forum information
Support
2011-09-02T14:22:36Z
Hi Andy,

this is solved right with new version?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
osirisja
2011-09-02T15:21:16Z
Hi Henrik

Yes it is resolved however for some reason I am getting STDERR messages written back to VC from Powershell when there are no errors from the particular software product. I suspect it is either something to do with the way I have written the PoSh script, or perhaps even the software itself is using STDERR in an unorthodox way. If so, I will raise it with their support desk.

Thanks for all your help

Regards

Andy
Scroll to Top