In my implementation of Azure batch, I am trying to install Python3.7.3 as part of the pool starttask event. However, I am not succeeding with this. Start task fails almost in all the times, returning 'invalid arguments'. What am I missing? Please help.
pool.ApplicationPackageReferences = new List { new ApplicationPackageReference { ApplicationId = "PythonInstall", Version = "1.0" } };
string appPath = String.Format("%AZ_BATCH_APP_PACKAGE_{0}#{1}%", appPackage_pyInstall_ID, appPackage_pyInstall_Version);
pool.StartTask = new StartTask()
{
CommandLine = $@" CMD.exe / copy --% {appPath}\python-3.7.3-amd64.exe %AZ_BATCH_NODE_STARTUP_DIR% && %AZ_BATCH_NODE_STARTUP_DIR%\python-3.7.3-amd64.exe /quiet InstallAllUsers=0 PrependPath=1 Include_test=0 TargetDir = %AZ_BATCH_NODE_STARTUP_DIR%",
UserIdentity = new UserIdentity(new AutoUserSpecification(elevationLevel: ElevationLevel.Admin, scope: AutoUserScope.Task)),
WaitForSuccess = true,
};
Ideally, I expect the installation to complete quietly but it is not happening :(