I'm trying to deploy an azure cloud service web role, a simple app to test connecting to Hive via odbc. In order to do so, I need to install the hive odbc driver on the machine before I launch the app, which is why I've added a startup task that calls a powershell script to download the driver than installs it like so:
startup.cmd
@echo off
powershell -command "Set-ExecutionPolicy Unrestricted" 2>> err.out
powershell .\dlHiveOdbcDriver.ps1 2>> err.out
hiveodbc.msi /passive
dlHiveOdbcDriver.ps1
(new-object system.net.webclient).downloadfile('https://download.microsoft.com/download/F/4/A/F4A2CA7D-5D14-4177-A7CE-B938EF3F3C24/HiveODBC32.msi', 'hiveodbc.msi')
My serviceDefinition has the following code to declare the startup task
<WebRole name="SomeTest" vmsize="ExtraSmall">
<Startup>
<Task commandLine="startup.cmd" taskType="simple" executionContext="elevated" />
</Startup>
...
</WebRole>
However, when I deploy the app, I still get the following error
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
which insinuates that the driver was not installed. I've tried restarting the app, made sure all the pre-requisites (scripts in root folder, copy always, executionPolicy etc') have been applied, but to no avail. Unfortunately I cannot remote into the machine currently, due to office issues...
Any help would be highly appreciated.