I have an Azure project with the role of MVC4, where I added a Visual C ++ 2012 Runtime Library configuration file and a script to silently install it.
The script runs and the library is installed, the only problem is that the task never ends and the installation process never ends, and then blocks the role from starting: 
I connected to the server using Remote Desktop, and looking at the task manager, I see the vcredist_x64.exe process: (2 of them are actually, but I think this is normal)

When I right-clicked and started the process, the deployment completed successfully and the role started.
This is a problem when my startup task is set to simple in ServiceDefinition.csdef, since it makes the server wait until the task completes to start the role. So, I set the background task, so running the script does not block the role from starting anymore, but even then the process is still running in the background and needs to be killed manually.
This script should work, and before it was with the VC ++ 2010 library (but without EXIT, but should be there to avoid blocking the role if the script returns an error code):
vcredist_x64.exe /quiet /norestart EXIT /B 0
It does not work, so I thought that I would delete this process manually after installation:
vcredist_x64.exe /quiet /norestart TASKKILL /F /T /IM vcredist_x64.exe EXIT /B 0
Does not work, the process is still alive. The script really works if I run it manually on my own on the server or locally, but when Azure tries to do this during deployment, it freezes.
My startup task is defined as follows: ServiceDefinition.csdef:
<Startup> <Task commandLine="InstallVcRedist.cmd" executionContext="elevated" taskType="background" /> </Startup>
Logs in C:\Resources\temp\{RoleId.RoleName}\RoleTemp say that everything went well.
I can avoid role blocking by setting startup-task to background instead of simple, but this really does not solve the problem. Thanks.