I'm trying to launch a VBS file as an Azure Batch Task and I'm constantly getting errors that the script file cannot be found.
Here's one command that works:
string appPath = String.Format("%AZ_BATCH_APP_PACKAGE_{0}#{1}%", appPackageId, appPackageVersion);
string taskCommandLine = String.Format("cmd /c {0}\\ffmpeg-3.4-win64-static\\bin\\ffmpeg.exe -i {1} -vcodec libx264 -crf 28 -c:a aac -b:a 128k {2} & del {3} & rename {4} {5}", appPath, inputMediaFile, outputMediaFile, inputMediaFile, outputMediaFile, inputMediaFile);
This one works correctly, but before firing ffmpeg on the input file, I'd like to do some checks with ffprobe first and doing so with a .bat kind of sucks so I tought of doing it in VBScript.
string appPath = String.Format("%AZ_BATCH_APP_PACKAGE_{0}#{1}%", appPackageId, appPackageVersion);
string taskCommandLine = String.Format("cmd /c cscript {0}\\ffmpeg-3.4-win64-static\\bin\\scan_run1.vbs {1} {2}", appPath, inputMediaFile, outputMediaFile);
Which results in:
Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: Can not find script file "D:\batch\tasks\applications\ffmpeg3.42019-02-01-19-50\ffmpeg-3.4-win64-static\bin\scan_run1.vbs"
I'm pretty sure the vbs is there, because invoking ffmpeg.exe at the exact same location works fine.
Is the Azure Portal stripping out the VBS out of the ZIP file when I upload it as package ? What is going on there ?
Thanks.
Turns out Azure Portal is not updating the application package when I replace it. So it's got "scan_run.vbs" but not "scan_run1.vbs" even though the ZIP file on my end has it.
batch-explorer
you will be able to dig under the fold structure in your node and see if the file exist. To me this is the clear case of someuser error
category, have you tried with version number? did it worked with version number? Please noteIf a specified package and version is already installed on the node, the package is not downloaded and the existing package is used.
please let me know how it goes. Thanks. – Tats_innit