@echo off
setlocal 
%~d0
cd "%~dp0"

@REM ----------------------------------------------------------------------------------
@REM Installing Azure Services Blobs and Queues Management Solution
@REM ----------------------------------------------------------------------------------

call .\Build.cmd

set pause=true
set installUtilDir=%WINDIR%\Microsoft.NET\Framework\v2.0.50727

@echo Installing SnapIns

%installUtilDir%\installutil.exe /u ..\..\..\code\CloudDrive\src\bin\Release\CloudDrive.dll
%installUtilDir%\installutil.exe /u ..\..\..\code\WindowsAzureMMC.SnapIn\bin\Release\Microsoft.Samples.WindowsAzureMmc.SnapIn.dll

%installUtilDir%\installutil.exe -i ..\..\..\code\CloudDrive\src\bin\Release\CloudDrive.dll
%installUtilDir%\installutil.exe -i ..\..\..\code\WindowsAzureMMC.SnapIn\bin\Release\Microsoft.Samples.WindowsAzureMmc.SnapIn.dll

xcopy  ..\..\..\code\WindowsAzureMMC.SnapIn\WindowsAzureMMC.msc ..\..\ /Y /R /I