Using Startup Task with command line redirection in Windows Azure Role

Recently while working on an incident I found that if you use Windows Azure Startup task with launch some application along with command line redirection (to collect log) directly as below, it may not launch the startup task: ServiceDefinition.csdef: 1: <Task commandLine="Startup\Application.exe >> C:\temp\logfilename.log 2>&1" executionContext="elevated" taskType="background" relativePath="approot\bin" />   As startup task will not…

1