I want to build up a load test rig in azure. I created 2 projects for 2 roles and let the instances download and setup the TestAgent and TestController. That works greatly for the test agent!
But it does not work for the Controller-setup: I created a startup task that runs a .cmd file, which downloads and installs the TestController. The weird thing is: The cmd file is executed (proofed by logs into outfile), but it does not install the TestController. Now when ich RDP on the instance and start the cmd file manually everything works fine!
This is my startup task definition:
<WorkerRole name="TestController" vmsize="ExtraSmall">
<Startup>
<Task executionContext="elevated" taskType="simple" commandLine="setupController.cmd"></Task>
I also tried it with taskType background, nothing different.
And this is my command file:
powershell $command = "set-executionpolicy Unrestricted"
powershell $command = ".\setupController.ps1" -NonInteractive >; out.txt
echo Setup TestController >> out.txt
.\testcontroller.exe /full /q >> out.txt
echo Setup was executed! >> out.txt
net user vstestagent password! /add
net localgroup Administrators vstestagent /add
REM Create a task that will run with full network privileges.
net start Schedule
schtasks /CREATE /TN "Configure Test Controller Service" /SC ONCE /SD 01/01/2020 /ST 00:00:00 /RL HIGHEST /RU vstestagent /RP password! /TR e:\approot\configcontroller.cmd /F
schtasks /RUN /TN "Configure Test Controller Service"
Does anyone know this problem? I thought it could be a privileges problem, but executionContext="elevated" rins with administrative privileges...
Best regards Sebastian
Edit: I searched Windows Event Log and found that my CMD is executed, but nothing about testcontroller.rexe being installed.


