瀏覽代碼

3412 - Ambari-SCOM MSI have to perform rollback in case of interrupted installation

tbeerbower 11 年之前
父節點
當前提交
f2146a41ed
共有 29 個文件被更改,包括 298 次插入680 次删除
  1. 6 9
      contrib/ambari-scom/msi/build.cmd
  2. 0 1
      contrib/ambari-scom/msi/src/AmbariPackages/ambari-winpkg/resources/winpkg.utils.psm1
  3. 35 2
      contrib/ambari-scom/msi/src/AmbariPackages/ambari-winpkg/scripts/install.ps1
  4. 10 2
      contrib/ambari-scom/msi/src/AmbariPackages/ambari-winpkg/scripts/uninstall.ps1
  5. 0 15
      contrib/ambari-scom/msi/src/AmbariSetupTools/winpkg.cmd
  6. 3 0
      contrib/ambari-scom/msi/src/AmbariSetupTools/winpkg.ps1
  7. 0 1
      contrib/ambari-scom/msi/src/AmbariSetupTools/winpkg.utils.psm1
  8. 0 38
      contrib/ambari-scom/msi/src/GUI/Program.cs
  9. 31 0
      contrib/ambari-scom/msi/src/GUI_Ambari.sln
  10. 3 3
      contrib/ambari-scom/msi/src/GUI_Ambari/App.config
  11. 11 15
      contrib/ambari-scom/msi/src/GUI_Ambari/Form1.Designer.cs
  12. 46 20
      contrib/ambari-scom/msi/src/GUI_Ambari/Form1.cs
  13. 2 1
      contrib/ambari-scom/msi/src/GUI_Ambari/Form1.resx
  14. 3 2
      contrib/ambari-scom/msi/src/GUI_Ambari/GUI_Ambari.csproj
  15. 81 0
      contrib/ambari-scom/msi/src/GUI_Ambari/Program.cs
  16. 11 14
      contrib/ambari-scom/msi/src/GUI_Ambari/Properties/AssemblyInfo.cs
  17. 30 42
      contrib/ambari-scom/msi/src/GUI_Ambari/Properties/Resources.Designer.cs
  18. 2 2
      contrib/ambari-scom/msi/src/GUI_Ambari/Properties/Resources.resx
  19. 13 17
      contrib/ambari-scom/msi/src/GUI_Ambari/Properties/Settings.Designer.cs
  20. 2 2
      contrib/ambari-scom/msi/src/GUI_Ambari/Properties/Settings.settings
  21. 0 92
      contrib/ambari-scom/msi/src/Result/Ambari_Result.csproj
  22. 0 19
      contrib/ambari-scom/msi/src/Result/App.config
  23. 0 43
      contrib/ambari-scom/msi/src/Result/Program.cs
  24. 0 52
      contrib/ambari-scom/msi/src/Result/Properties/AssemblyInfo.cs
  25. 0 87
      contrib/ambari-scom/msi/src/Result/Properties/Resources.Designer.cs
  26. 0 130
      contrib/ambari-scom/msi/src/Result/Properties/Resources.resx
  27. 0 45
      contrib/ambari-scom/msi/src/Result/Properties/Settings.Designer.cs
  28. 0 20
      contrib/ambari-scom/msi/src/Result/Properties/Settings.settings
  29. 9 6
      contrib/ambari-scom/msi/src/ambari-scom.wxs

+ 6 - 9
contrib/ambari-scom/msi/build.cmd

@@ -27,11 +27,8 @@ powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -comma
 
 
 echo Building GUI
 echo Building GUI
 set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319
 set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319
-call %msBuildDir%\msbuild.exe "%cd%\src\GUI\GUI_Ambari.csproj"  || exit /b 1
-copy /y "%cd%\src\GUI\bin\Debug\GUI_Ambari.exe" "%cd%\src\bin\GUI_Ambari.exe" || exit /b 1
-
-echo Building Result Messagebox
-call %msBuildDir%\msbuild.exe "%cd%\src\Result\Ambari_Result.csproj"  || exit /b 1
+call %msBuildDir%\msbuild.exe "%cd%\src\GUI_Ambari\GUI_Ambari.csproj"  || exit /b 1
+copy /y "%cd%\src\GUI_Ambari\bin\Debug\GUI_Ambari.exe" "%cd%\src\bin\GUI_Ambari.exe" || exit /b 1
 mkdir "%cd%\src\bin\"
 mkdir "%cd%\src\bin\"
 copy /y "%cd%\src\Result\bin\Debug\Ambari_Result.exe" "%cd%\src\bin\Ambari_Result.exe" || exit /b 1
 copy /y "%cd%\src\Result\bin\Debug\Ambari_Result.exe" "%cd%\src\bin\Ambari_Result.exe" || exit /b 1
 
 
@@ -46,14 +43,14 @@ echo Cleaning
 del /f /q "%cd%\src\ambari-scom.wixobj"  || exit /b 1
 del /f /q "%cd%\src\ambari-scom.wixobj"  || exit /b 1
 del /f /q "%cd%\src\ambari-scom.wixpdb"  || exit /b 1
 del /f /q "%cd%\src\ambari-scom.wixpdb"  || exit /b 1
 del /f /q "%cd%\src\ambari-scom.msi"  || exit /b 1
 del /f /q "%cd%\src\ambari-scom.msi"  || exit /b 1
+attrib -r -s -h "%cd%\src\GUI_Ambari.v11.suo" || exit /b 1
+del /f /q "%cd%\src\GUI_Ambari.v11.suo"  || exit /b 1
 del /f /q "%cd%\src\bin\GUI_Ambari.exe"  || exit /b 1
 del /f /q "%cd%\src\bin\GUI_Ambari.exe"  || exit /b 1
 del /f /q "%cd%\src\bin\Ambari_Result.exe"  || exit /b 1
 del /f /q "%cd%\src\bin\Ambari_Result.exe"  || exit /b 1
 del /f /q "%cd%\src\AmbariPackages\ambari-winpkg.zip" || exit /b 1
 del /f /q "%cd%\src\AmbariPackages\ambari-winpkg.zip" || exit /b 1
 del /f /q "%cd%\src\AmbariPackages\ambari-winpkg\resources\*.jar"  || exit /b 1
 del /f /q "%cd%\src\AmbariPackages\ambari-winpkg\resources\*.jar"  || exit /b 1
 del /f /q "%cd%\src\AmbariPackages\ambari-winpkg\resources\*.zip"  || exit /b 1
 del /f /q "%cd%\src\AmbariPackages\ambari-winpkg\resources\*.zip"  || exit /b 1
 del /f /q "%cd%\src\AmbariPackages\ambari-winpkg\resources\Hadoop-Metrics-SQLServer-CREATE.ddl"  || exit /b 1
 del /f /q "%cd%\src\AmbariPackages\ambari-winpkg\resources\Hadoop-Metrics-SQLServer-CREATE.ddl"  || exit /b 1
-rd /s /q "%cd%\src\GUI\bin"  || exit /b 1
-rd /s /q "%cd%\src\GUI\obj"  || exit /b 1
-rd /s /q "%cd%\src\Result\bin"  || exit /b 1
-rd /s /q "%cd%\src\Result\obj"  || exit /b 1
+rd /s /q "%cd%\src\GUI_Ambari\bin"  || exit /b 1
+rd /s /q "%cd%\src\GUI_Ambari\obj"  || exit /b 1
 echo Done
 echo Done

+ 0 - 1
contrib/ambari-scom/msi/src/AmbariPackages/ambari-winpkg/resources/winpkg.utils.psm1

@@ -14,7 +14,6 @@
 ### limitations under the License.
 ### limitations under the License.
 
 
 
 
-### NOTE: This file is common across the Windows installer projects for Hadoop Core, Hive, and Pig.
 ### This dependency is currently managed by convention.
 ### This dependency is currently managed by convention.
 ### If you find yourself needing to change something in this file, it's likely that you're
 ### If you find yourself needing to change something in this file, it's likely that you're
 ### either doing something that's more easily done outside this file or is a bigger change
 ### either doing something that's more easily done outside this file or is a bigger change

+ 35 - 2
contrib/ambari-scom/msi/src/AmbariPackages/ambari-winpkg/scripts/install.ps1

@@ -132,6 +132,7 @@ function Main( $scriptDir )
 	[Environment]::SetEnvironmentVariable("AMB_DATA_DIR", $destination, "Machine")
 	[Environment]::SetEnvironmentVariable("AMB_DATA_DIR", $destination, "Machine")
 	if (!(test-path $destination)) {New-Item -path $destination -ItemType directory}
 	if (!(test-path $destination)) {New-Item -path $destination -ItemType directory}
 	$path = [Environment]::CurrentDirectory
 	$path = [Environment]::CurrentDirectory
+	$env:AMB_INSTALL_PATH = [Environment]::CurrentDirectory
 	$Package_trim =  Split-Path -Path $path -Parent
 	$Package_trim =  Split-Path -Path $path -Parent
 	Write-Log "Copying Ambari-Scom.Jar"
 	Write-Log "Copying Ambari-Scom.Jar"
 	$jar = Join-Path $Package_trim "resources\ambari-scom-*.jar"
 	$jar = Join-Path $Package_trim "resources\ambari-scom-*.jar"
@@ -149,6 +150,17 @@ function Main( $scriptDir )
 	Copy-Item -Force $jar $destination
 	Copy-Item -Force $jar $destination
 	Write-log "Pushing Ambari-SCOM and SQL Server JDBC to each node"
 	Write-log "Pushing Ambari-SCOM and SQL Server JDBC to each node"
 	$current = @()
 	$current = @()
+    $failed=@()
+ 	$failed_file = join-path $env:TMP "ambari_failed.txt"
+	$db_file = join-path $env:TMP "db_ambari_failed.txt"
+ 	if (Test-Path $failed_file)
+ 	{
+ 		Remove-Item $failed_file -Force
+ 	}
+	if (Test-Path $db_file)
+	{
+		Remove-Item $db_file -Force
+	}
 	$SQL_SERVER_NAME = $env:SQL_SERVER_NAME
 	$SQL_SERVER_NAME = $env:SQL_SERVER_NAME
 	if (($SQL_SERVER_NAME  -ieq "localhost") -or ($SQL_SERVER_NAME  -ieq "127.0.0.1"))
 	if (($SQL_SERVER_NAME  -ieq "localhost") -or ($SQL_SERVER_NAME  -ieq "127.0.0.1"))
 	{
 	{
@@ -192,6 +204,7 @@ function Main( $scriptDir )
 					{
 					{
 						Out-File -FilePath $log -InputObject "Modifying $name.xml" -Append -Encoding "UTF8"
 						Out-File -FilePath $log -InputObject "Modifying $name.xml" -Append -Encoding "UTF8"
 						Write-Host "Modifying $name.xml"
 						Write-Host "Modifying $name.xml"
+                        Write-Output "Modifying $name.xml"
 						[xml]$xml = Get-Content $xml_file
 						[xml]$xml = Get-Content $xml_file
 						$arguments = ($xml.service.arguments).split(" ")
 						$arguments = ($xml.service.arguments).split(" ")
 						for ($i = 0; $i -lt $arguments.length; $i++){
 						for ($i = 0; $i -lt $arguments.length; $i++){
@@ -220,15 +233,22 @@ function Main( $scriptDir )
 				{
 				{
 					Out-File -FilePath $log -InputObject "Creating MonitoringDatabase environment" -Append -Encoding "UTF8"
 					Out-File -FilePath $log -InputObject "Creating MonitoringDatabase environment" -Append -Encoding "UTF8"
 					Write-HOST "Creating MonitoringDatabase environment"
 					Write-HOST "Creating MonitoringDatabase environment"
+                    Write-Output "Creating MonitoringDatabase environment"
 					$sql_path = Join-Path $destination "\Hadoop-Metrics-SQLServer-CREATE.ddl"
 					$sql_path = Join-Path $destination "\Hadoop-Metrics-SQLServer-CREATE.ddl"
-					$cmd ="sqlcmd -s $SQL_SERVER_NAME -i $sql_path"
-					invoke-cmd $cmd 
+					$cmd ="sqlcmd -s $SQL_SERVER_NAME -i $sql_path -U $SQL_SERVER_LOGIN -P $SQL_SERVER_PASSWORD"
+					$check = invoke-cmd $cmd 
+					if ($check -like "*failed*")
+					{
+						Write-Output "Cannot create database"
+						Out-File -FilePath $log -InputObject "Cannot create database" -Append -Encoding "UTF8"
+					}
 				}
 				}
 				$hdp_home = [Environment]::GetEnvironmentVariable("HADOOP_HOME","Machine")
 				$hdp_home = [Environment]::GetEnvironmentVariable("HADOOP_HOME","Machine")
 				if ($hdp_home -ne $null)
 				if ($hdp_home -ne $null)
 				{
 				{
 					Out-File -FilePath $log -InputObject "Installing data sink on $server" -Append -Encoding "UTF8"
 					Out-File -FilePath $log -InputObject "Installing data sink on $server" -Append -Encoding "UTF8"
 					Write-Host "Installing data sink on $server"
 					Write-Host "Installing data sink on $server"
+                    Write-Output "Installing data sink on $server"
 					$metrics = Join-Path $hdp_home "bin\hadoop-metrics2.properties"
 					$metrics = Join-Path $hdp_home "bin\hadoop-metrics2.properties"
 					if (-not (test-path $metrics))
 					if (-not (test-path $metrics))
 					{
 					{
@@ -242,15 +262,18 @@ function Main( $scriptDir )
 					}
 					}
 					Out-File -FilePath $log -InputObject "Modifying CLASSPATH" -Append -Encoding "UTF8"
 					Out-File -FilePath $log -InputObject "Modifying CLASSPATH" -Append -Encoding "UTF8"
 					Write-Host "Modifying CLASSPATH"
 					Write-Host "Modifying CLASSPATH"
+                    Write-Output "Modifying CLASSPATH"
 					$names = @("namenode","secondarynamenode","datanode","historyserver","jobtracker","tasktracker")
 					$names = @("namenode","secondarynamenode","datanode","historyserver","jobtracker","tasktracker")
 					foreach ($name in $names)
 					foreach ($name in $names)
 					{
 					{
 						modify_xml $name
 						modify_xml $name
 					}
 					}
 					Write-Host "Start services flag is $START_SERVICES"
 					Write-Host "Start services flag is $START_SERVICES"
+                    Write-Output "Start services flag is $START_SERVICES"
 					if ($START_SERVICES -like "*yes*")
 					if ($START_SERVICES -like "*yes*")
 					{
 					{
 						Write-Host "Starting services"
 						Write-Host "Starting services"
+                        Write-Output "Starting services"
 						Out-File -FilePath $log -InputObject "Starting HDP services" -Append -Encoding "UTF8"
 						Out-File -FilePath $log -InputObject "Starting HDP services" -Append -Encoding "UTF8"
 						$hdp_root= [Environment]::GetEnvironmentVariable("HADOOP_NODE_INSTALL_ROOT","Machine")
 						$hdp_root= [Environment]::GetEnvironmentVariable("HADOOP_NODE_INSTALL_ROOT","Machine")
 						$cmd = Join-Path $hdp_root "start_local_hdp_services.cmd"
 						$cmd = Join-Path $hdp_root "start_local_hdp_services.cmd"
@@ -261,14 +284,21 @@ function Main( $scriptDir )
 				{	
 				{	
 					Out-File -FilePath $log -InputObject "Cleaning things on SQL server" -Append -Encoding "UTF8"
 					Out-File -FilePath $log -InputObject "Cleaning things on SQL server" -Append -Encoding "UTF8"
 					Write-Host "Cleaning things on SQL server"
 					Write-Host "Cleaning things on SQL server"
+                    Write-Output "Cleaning things on SQL server"
 					$log_new = Join-Path $ENV:TMP "ambari_install.log"
 					$log_new = Join-Path $ENV:TMP "ambari_install.log"
 					Copy-Item $log $log_new
 					Copy-Item $log $log_new
 					Remove-Item $Destination -force -Recurse
 					Remove-Item $Destination -force -Recurse
 				}
 				}
 			} -ArgumentList ($server,$SQL_SERVER_NAME,$SQL_SERVER_PORT,$SQL_SERVER_LOGIN,$SQL_SERVER_PASSWORD,$destination,$ambari_metrics,$START_SERVICES)
 			} -ArgumentList ($server,$SQL_SERVER_NAME,$SQL_SERVER_PORT,$SQL_SERVER_LOGIN,$SQL_SERVER_PASSWORD,$destination,$ambari_metrics,$START_SERVICES)
+            if ($out -like "*Cannot create database*")
+			{
+                Write-Log "DB creation on $server failed."
+				Out-File -FilePath $db_file -InputObject $server -Append -Encoding "UTF8"
+			}
 			if ($out -eq $null)
 			if ($out -eq $null)
 			{
 			{
 				Write-Log "Installation on $server failed. Please check host availability"
 				Write-Log "Installation on $server failed. Please check host availability"
+                Out-File -FilePath $failed_file -InputObject $server -Append -Encoding "UTF8"
 			}
 			}
 			else
 			else
 			{
 			{
@@ -333,7 +363,10 @@ try
 }
 }
 catch
 catch
 {
 {
+	
 	Write-Log $_.Exception.Message "Failure" $_
 	Write-Log $_.Exception.Message "Failure" $_
+	Write-Log "Starting rollback"
+	invoke-ps "$env:AMB_INSTALL_PATH\uninstall.ps1"
 	exit 1
 	exit 1
 }
 }
 finally
 finally

+ 10 - 2
contrib/ambari-scom/msi/src/AmbariPackages/ambari-winpkg/scripts/uninstall.ps1

@@ -47,8 +47,16 @@ function Main( $scriptDir )
     Write-Log "UNINSTALLATION STARTED"
     Write-Log "UNINSTALLATION STARTED"
 	Write-Log "Reading Ambari and HDP layout"
 	Write-Log "Reading Ambari and HDP layout"
 	$destination= [Environment]::GetEnvironmentVariable("AMB_DATA_DIR","Machine")
 	$destination= [Environment]::GetEnvironmentVariable("AMB_DATA_DIR","Machine")
-	$ENV:AMB_LAYOUT = Join-Path $destination "ambariproperties.txt"
-	$ENV:HDP_LAYOUT = Join-Path $destination "clusterproperties.txt"
+	if (-not (Test-Path ENV:AMB_LAYOUT))
+	{
+		$ENV:AMB_LAYOUT = Join-Path $destination "ambariproperties.txt"
+	}
+	if (-not (Test-Path ENV:HDP_LAYOUT) -or ($ENV:HDP_LAYOUT -notlike "*:"))
+	{
+		$ENV:HDP_LAYOUT = Join-Path $destination "clusterproperties.txt"
+	}
+	Write-Log "Ambari layout = $ENV:AMB_LAYOUT" 
+	Write-Log "Cluster layout = $ENV:HDP_LAYOUT" 
 	Export-ClusterLayoutIntoEnv $ENV:AMB_LAYOUT "amb"
 	Export-ClusterLayoutIntoEnv $ENV:AMB_LAYOUT "amb"
 	Export-ClusterLayoutIntoEnv $ENV:HDP_LAYOUT "hdp"
 	Export-ClusterLayoutIntoEnv $ENV:HDP_LAYOUT "hdp"
 	$jar = Join-Path $destination "\metrics-sink-*.jar"
 	$jar = Join-Path $destination "\metrics-sink-*.jar"

+ 0 - 15
contrib/ambari-scom/msi/src/AmbariSetupTools/winpkg.cmd

@@ -14,20 +14,5 @@ rem See the License for the specific language governing permissions and
 rem limitations under the License.
 rem limitations under the License.
 
 
 @echo off
 @echo off
-@rem Licensed to the Apache Software Foundation (ASF) under one or more
-@rem contributor license agreements.  See the NOTICE file distributed with
-@rem this work for additional information regarding copyright ownership.
-@rem The ASF licenses this file to You under the Apache License, Version 2.0
-@rem (the "License"); you may not use this file except in compliance with
-@rem the License.  You may obtain a copy of the License at
-@rem
-@rem     http://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-
 powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -command %~dp0winpkg.ps1 %*
 powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -command %~dp0winpkg.ps1 %*
 goto :eof
 goto :eof

+ 3 - 0
contrib/ambari-scom/msi/src/AmbariSetupTools/winpkg.ps1

@@ -495,14 +495,17 @@ function Main( $winpkgBinPath, $Package, $Action )
 	    [Environment]::CurrentDirectory = $pwd
 	    [Environment]::CurrentDirectory = $pwd
 		if ($env:HDP_LAYOUT -notlike "*:*")
 		if ($env:HDP_LAYOUT -notlike "*:*")
 		{
 		{
+			Write-Log "Setting HDP_LAYOUT" 
 			$HDP_LAYOUT = [Environment]::GetEnvironmentVariable("HDP_LAYOUT","Machine")
 			$HDP_LAYOUT = [Environment]::GetEnvironmentVariable("HDP_LAYOUT","Machine")
 			if ($HDP_LAYOUT -eq $null)
 			if ($HDP_LAYOUT -eq $null)
 			{
 			{
+				Write-Log "Setting HDP_LAYOUT from HDP installed" 
 				$HNIR= [Environment]::GetEnvironmentVariable("HADOOP_NODE_INSTALL_ROOT","Machine")
 				$HNIR= [Environment]::GetEnvironmentVariable("HADOOP_NODE_INSTALL_ROOT","Machine")
 				$ENV:HDP_LAYOUT = "$HNIR\cluster.properties"
 				$ENV:HDP_LAYOUT = "$HNIR\cluster.properties"
 			}
 			}
 			else
 			else
 			{
 			{
+				Write-Log "Setting HDP_LAYOUT from system environment" 
 				$ENV:HDP_LAYOUT=$HDP_LAYOUT
 				$ENV:HDP_LAYOUT=$HDP_LAYOUT
 			}
 			}
 		}
 		}

+ 0 - 1
contrib/ambari-scom/msi/src/AmbariSetupTools/winpkg.utils.psm1

@@ -14,7 +14,6 @@
 ### limitations under the License.
 ### limitations under the License.
 
 
 
 
-### NOTE: This file is common across the Windows installer projects for Hadoop Core, Hive, and Pig.
 ### This dependency is currently managed by convention.
 ### This dependency is currently managed by convention.
 ### If you find yourself needing to change something in this file, it's likely that you're
 ### If you find yourself needing to change something in this file, it's likely that you're
 ### either doing something that's more easily done outside this file or is a bigger change
 ### either doing something that's more easily done outside this file or is a bigger change

+ 0 - 38
contrib/ambari-scom/msi/src/GUI/Program.cs

@@ -1,38 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace GUI_Ambari
-{
-    static class Program
-    {
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main()
-        {
-            Application.EnableVisualStyles();
-            Application.SetCompatibleTextRenderingDefault(false);
-            Application.Run(new Form1());
-        }
-    }
-}

+ 31 - 0
contrib/ambari-scom/msi/src/GUI_Ambari.sln

@@ -0,0 +1,31 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+#Licensed to the Apache Software Foundation (ASF) under one or more
+#contributor license agreements.  See the NOTICE file distributed with
+#this work for additional information regarding copyright ownership.
+#The ASF licenses this file to You under the Apache License, Version 2.0
+#(the "License"); you may not use this file except in compliance with
+#the License.  You may obtain a copy of the License at
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+# Visual Studio Express 2012 for Windows Desktop
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUI_Ambari", "GUI_Ambari\GUI_Ambari.csproj", "{48B27787-5714-4C28-9F9D-8B2A02237BAD}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{48B27787-5714-4C28-9F9D-8B2A02237BAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{48B27787-5714-4C28-9F9D-8B2A02237BAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{48B27787-5714-4C28-9F9D-8B2A02237BAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{48B27787-5714-4C28-9F9D-8B2A02237BAD}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 3 - 3
contrib/ambari-scom/msi/src/GUI/App.config → contrib/ambari-scom/msi/src/GUI_Ambari/App.config

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
 <!-- Licensed to the Apache Software Foundation (ASF) under one or more
 <!-- Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 this work for additional information regarding copyright ownership.
@@ -11,9 +11,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 See the License for the specific language governing permissions and
 limitations under the License. -->
 limitations under the License. -->
-
+<!-- test -->
 <configuration>
 <configuration>
     <startup> 
     <startup> 
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
     </startup>
     </startup>
-</configuration>
+</configuration>

+ 11 - 15
contrib/ambari-scom/msi/src/GUI/Form1.Designer.cs → contrib/ambari-scom/msi/src/GUI_Ambari/Form1.Designer.cs

@@ -1,19 +1,15 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
+//Licensed to the Apache Software Foundation (ASF) under one or more
+//contributor license agreements.  See the NOTICE file distributed with
+//this work for additional information regarding copyright ownership.
+//The ASF licenses this file to You under the Apache License, Version 2.0
+//(the "License"); you may not use this file except in compliance with
+//the License.  You may obtain a copy of the License at
 //     http://www.apache.org/licenses/LICENSE-2.0
 //     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
 namespace GUI_Ambari
 namespace GUI_Ambari
 {
 {
     partial class Form1
     partial class Form1

+ 46 - 20
contrib/ambari-scom/msi/src/GUI/Form1.cs → contrib/ambari-scom/msi/src/GUI_Ambari/Form1.cs

@@ -1,18 +1,15 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
+//Licensed to the Apache Software Foundation (ASF) under one or more
+//contributor license agreements.  See the NOTICE file distributed with
+//this work for additional information regarding copyright ownership.
+//The ASF licenses this file to You under the Apache License, Version 2.0
+//(the "License"); you may not use this file except in compliance with
+//the License.  You may obtain a copy of the License at
 //     http://www.apache.org/licenses/LICENSE-2.0
 //     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
 
 
 using System;
 using System;
 using System.IO;
 using System.IO;
@@ -41,10 +38,20 @@ namespace GUI_Ambari
         private void Form1_Load(object sender, EventArgs e)
         private void Form1_Load(object sender, EventArgs e)
         {
         {
             Sname.Text = Environment.GetEnvironmentVariable("computername");
             Sname.Text = Environment.GetEnvironmentVariable("computername");
-
-
+            CLP_Path();
+        }
+        private void CLP_Path()
+        { 
+             if (!string.IsNullOrEmpty (Environment.GetEnvironmentVariable("HADOOP_HOME")))
+            {
+                try
+                {
+                    Cpath.Text = Path.GetFullPath(Environment.GetEnvironmentVariable("HADOOP_NODE_INSTALL_ROOT") + @"\cluster.properties");
+                }
+                catch 
+                { }
+            }
         }
         }
-
         private void Browse_Click(object sender, EventArgs e)
         private void Browse_Click(object sender, EventArgs e)
         {
         {
             BrowseDirs.ShowDialog();
             BrowseDirs.ShowDialog();
@@ -79,7 +86,7 @@ namespace GUI_Ambari
 
 
         }
         }
 
 
-        private void Install_Click(object sender, EventArgs e)
+        private void Install_Click(object sender, EventArgs e) 
         {
         {
             if (string.IsNullOrEmpty(AID.Text) || string.IsNullOrEmpty(Sname.Text) || string.IsNullOrEmpty(Sport.Text) || string.IsNullOrEmpty(Slogin.Text) || string.IsNullOrEmpty(Spassword.Text) || string.IsNullOrEmpty(SQLDpath.Text))
             if (string.IsNullOrEmpty(AID.Text) || string.IsNullOrEmpty(Sname.Text) || string.IsNullOrEmpty(Sport.Text) || string.IsNullOrEmpty(Slogin.Text) || string.IsNullOrEmpty(Spassword.Text) || string.IsNullOrEmpty(SQLDpath.Text))
             {
             {
@@ -93,6 +100,10 @@ namespace GUI_Ambari
             {
             {
                 MessageBox.Show("Please enter correct SQL JDBC driver path", "Error");
                 MessageBox.Show("Please enter correct SQL JDBC driver path", "Error");
             }
             }
+            else if (string.IsNullOrEmpty(Cpath.Text) & string.IsNullOrEmpty (Environment.GetEnvironmentVariable("HADOOP_HOME")))
+            {
+                MessageBox.Show("You are installing Ambari on separate node. Please enter correct cluster layout file path", "Error");
+            }
             else
             else
             {
             {
                 //if (!(Sname.Text == Environment.GetEnvironmentVariable("computername")))
                 //if (!(Sname.Text == Environment.GetEnvironmentVariable("computername")))
@@ -112,11 +123,25 @@ namespace GUI_Ambari
             DialogResult result = MessageBox.Show("Do you really want to exit?", "Warning", MessageBoxButtons.YesNo);
             DialogResult result = MessageBox.Show("Do you really want to exit?", "Warning", MessageBoxButtons.YesNo);
             if (result == DialogResult.Yes)
             if (result == DialogResult.Yes)
             {
             {
+                Kill_Msiexec();
                 Environment.Exit(1);
                 Environment.Exit(1);
             }
             }
-
         }
         }
 
 
+        private void Kill_Msiexec()
+        {
+            try
+            {
+                var processes = Process.GetProcessesByName("msiexec").OrderBy(x => x.StartTime);
+                foreach (var process in processes)
+                {
+                    process.Kill();
+                }
+            }
+            catch
+            {
+            }
+        }
         private void Reset_Click(object sender, EventArgs e)
         private void Reset_Click(object sender, EventArgs e)
         {
         {
             AID.Text = "C:\\Ambari";
             AID.Text = "C:\\Ambari";
@@ -128,6 +153,7 @@ namespace GUI_Ambari
             Cpath.Clear();
             Cpath.Clear();
             SQLDpath.Clear();
             SQLDpath.Clear();
             Cstart.Checked = false;
             Cstart.Checked = false;
+            CLP_Path();
         }
         }
 
 
         private void Spassworde_CheckedChanged(object sender, EventArgs e)
         private void Spassworde_CheckedChanged(object sender, EventArgs e)
@@ -273,4 +299,4 @@ namespace GUI_Ambari
             }
             }
         }
         }
     }
     }
-}
+}

+ 2 - 1
contrib/ambari-scom/msi/src/GUI/Form1.resx → contrib/ambari-scom/msi/src/GUI_Ambari/Form1.resx

@@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 See the License for the specific language governing permissions and
 limitations under the License. -->
 limitations under the License. -->
 
 
+<!-- test -->
 <root>
 <root>
   <!-- 
   <!-- 
     Microsoft ResX Schema 
     Microsoft ResX Schema 
@@ -136,4 +137,4 @@ limitations under the License. -->
   <metadata name="OpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
   <metadata name="OpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>129, 17</value>
     <value>129, 17</value>
   </metadata>
   </metadata>
-</root>
+</root>

+ 3 - 2
contrib/ambari-scom/msi/src/GUI/GUI_Ambari.csproj → contrib/ambari-scom/msi/src/GUI_Ambari/GUI_Ambari.csproj

@@ -11,7 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 See the License for the specific language governing permissions and
 limitations under the License. -->
 limitations under the License. -->
-
+<!-- test -->
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
   <PropertyGroup>
@@ -76,6 +76,7 @@ limitations under the License. -->
     <Compile Include="Properties\Resources.Designer.cs">
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
       <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
     </Compile>
     </Compile>
     <None Include="Properties\Settings.settings">
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <Generator>SettingsSingleFileGenerator</Generator>
@@ -98,4 +99,4 @@ limitations under the License. -->
   <Target Name="AfterBuild">
   <Target Name="AfterBuild">
   </Target>
   </Target>
   -->
   -->
-</Project>
+</Project>

+ 81 - 0
contrib/ambari-scom/msi/src/GUI_Ambari/Program.cs

@@ -0,0 +1,81 @@
+//Licensed to the Apache Software Foundation (ASF) under one or more
+//contributor license agreements.  See the NOTICE file distributed with
+//this work for additional information regarding copyright ownership.
+//The ASF licenses this file to You under the Apache License, Version 2.0
+//(the "License"); you may not use this file except in compliance with
+//the License.  You may obtain a copy of the License at
+//     http://www.apache.org/licenses/LICENSE-2.0
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace GUI_Ambari
+{
+    static class Program
+    {
+      
+        [STAThread]
+        static void Main(string[] args)
+        {
+            string mode = args[0];
+            switch (mode)
+            { 
+                case "gui":
+                    Application.EnableVisualStyles();
+                    Application.SetCompatibleTextRenderingDefault(false);
+                    Application.Run(new Form1());
+                break;
+                case "install":
+                string file_inst = Environment.GetEnvironmentVariable("tmp") + @"\ambari_failed.txt";
+                    if (File.Exists(file_inst))
+                    {
+                        string text = File.ReadAllText(file_inst);
+                        DialogResult result_inst = MessageBox.Show("Installation on next nodes failed.\r\nPlease proceed with manual installation for these nodes\r\n" + text, "Ambari-SCOM Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
+                        if (result_inst == DialogResult.OK)
+                        {
+                            File.Delete(file_inst);
+                            Environment.Exit(0);
+                        }
+                    }
+                  
+                break;
+                case "uninstall":
+                    string file_un = Environment.GetEnvironmentVariable("tmp") + @"\ambari_failed.txt";
+                    if (File.Exists(file_un))
+                    {
+                        string text = File.ReadAllText(file_un);
+                        DialogResult result_un = MessageBox.Show("Uninstallation on next nodes failed.\r\nPlease proceed with manual uninstallation for these nodes\r\n" + text, "Ambari-SCOM Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1,MessageBoxOptions.DefaultDesktopOnly);
+                        if (result_un == DialogResult.OK)
+                        {
+                            File.Delete(file_un);
+                            Environment.Exit(0);
+                        }
+                    }
+                break;
+                case "db":
+                    string file_db = Environment.GetEnvironmentVariable("tmp") + @"\db_ambari_failed.txt";
+                    if (File.Exists(file_db))
+                    {
+                        string text = File.ReadAllText(file_db);
+                        DialogResult result_db = MessageBox.Show("Database creation on SQL server: " + text+" failed. Please create database manually", "Ambari-SCOM Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
+                        if (result_db == DialogResult.OK)
+                        {
+                            File.Delete(file_db);
+                            Environment.Exit(0);
+                        }
+                    }
+                break;
+
+            }
+        }
+    }
+}

+ 11 - 14
contrib/ambari-scom/msi/src/GUI/Properties/AssemblyInfo.cs → contrib/ambari-scom/msi/src/GUI_Ambari/Properties/AssemblyInfo.cs

@@ -1,18 +1,15 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
+//Licensed to the Apache Software Foundation (ASF) under one or more
+//contributor license agreements.  See the NOTICE file distributed with
+//this work for additional information regarding copyright ownership.
+//The ASF licenses this file to You under the Apache License, Version 2.0
+//(the "License"); you may not use this file except in compliance with
+//the License.  You may obtain a copy of the License at
 //     http://www.apache.org/licenses/LICENSE-2.0
 //     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
 
 
 using System.Reflection;
 using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.CompilerServices;

+ 30 - 42
contrib/ambari-scom/msi/src/GUI/Properties/Resources.Designer.cs → contrib/ambari-scom/msi/src/GUI_Ambari/Properties/Resources.Designer.cs

@@ -1,20 +1,4 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 // <auto-generated>
 // <auto-generated>
 //     This code was generated by a tool.
 //     This code was generated by a tool.
 //     Runtime Version:4.0.30319.18052
 //     Runtime Version:4.0.30319.18052
@@ -23,11 +7,23 @@
 //     the code is regenerated.
 //     the code is regenerated.
 // </auto-generated>
 // </auto-generated>
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
+//Licensed to the Apache Software Foundation (ASF) under one or more
+//contributor license agreements.  See the NOTICE file distributed with
+//this work for additional information regarding copyright ownership.
+//The ASF licenses this file to You under the Apache License, Version 2.0
+//(the "License"); you may not use this file except in compliance with
+//the License.  You may obtain a copy of the License at
+//     http://www.apache.org/licenses/LICENSE-2.0
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
 
 
-namespace GUI_Ambari.Properties
-{
-
-
+namespace GUI_Ambari.Properties {
+    using System;
+    
+    
     /// <summary>
     /// <summary>
     ///   A strongly-typed resource class, for looking up localized strings, etc.
     ///   A strongly-typed resource class, for looking up localized strings, etc.
     /// </summary>
     /// </summary>
@@ -38,48 +34,40 @@ namespace GUI_Ambari.Properties
     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources
-    {
-
+    internal class Resources {
+        
         private static global::System.Resources.ResourceManager resourceMan;
         private static global::System.Resources.ResourceManager resourceMan;
-
+        
         private static global::System.Globalization.CultureInfo resourceCulture;
         private static global::System.Globalization.CultureInfo resourceCulture;
-
+        
         [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
         [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources()
-        {
+        internal Resources() {
         }
         }
-
+        
         /// <summary>
         /// <summary>
         ///   Returns the cached ResourceManager instance used by this class.
         ///   Returns the cached ResourceManager instance used by this class.
         /// </summary>
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager
-        {
-            get
-            {
-                if ((resourceMan == null))
-                {
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
                     global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GUI_Ambari.Properties.Resources", typeof(Resources).Assembly);
                     global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GUI_Ambari.Properties.Resources", typeof(Resources).Assembly);
                     resourceMan = temp;
                     resourceMan = temp;
                 }
                 }
                 return resourceMan;
                 return resourceMan;
             }
             }
         }
         }
-
+        
         /// <summary>
         /// <summary>
         ///   Overrides the current thread's CurrentUICulture property for all
         ///   Overrides the current thread's CurrentUICulture property for all
         ///   resource lookups using this strongly typed resource class.
         ///   resource lookups using this strongly typed resource class.
         /// </summary>
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture
-        {
-            get
-            {
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
                 return resourceCulture;
                 return resourceCulture;
             }
             }
-            set
-            {
+            set {
                 resourceCulture = value;
                 resourceCulture = value;
             }
             }
         }
         }

+ 2 - 2
contrib/ambari-scom/msi/src/GUI/Properties/Resources.resx → contrib/ambari-scom/msi/src/GUI_Ambari/Properties/Resources.resx

@@ -11,7 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 See the License for the specific language governing permissions and
 limitations under the License. -->
 limitations under the License. -->
-
+<!-- test -->
 <root>
 <root>
   <!-- 
   <!-- 
     Microsoft ResX Schema 
     Microsoft ResX Schema 
@@ -127,4 +127,4 @@ limitations under the License. -->
   <resheader name="writer">
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   </resheader>
-</root>
+</root>

+ 13 - 17
contrib/ambari-scom/msi/src/GUI/Properties/Settings.Designer.cs → contrib/ambari-scom/msi/src/GUI_Ambari/Properties/Settings.Designer.cs

@@ -1,20 +1,4 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
 // <auto-generated>
 // <auto-generated>
 //     This code was generated by a tool.
 //     This code was generated by a tool.
 //     Runtime Version:4.0.30319.18052
 //     Runtime Version:4.0.30319.18052
@@ -23,6 +7,18 @@
 //     the code is regenerated.
 //     the code is regenerated.
 // </auto-generated>
 // </auto-generated>
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
+//Licensed to the Apache Software Foundation (ASF) under one or more
+//contributor license agreements.  See the NOTICE file distributed with
+//this work for additional information regarding copyright ownership.
+//The ASF licenses this file to You under the Apache License, Version 2.0
+//(the "License"); you may not use this file except in compliance with
+//the License.  You may obtain a copy of the License at
+//     http://www.apache.org/licenses/LICENSE-2.0
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
 
 
 namespace GUI_Ambari.Properties
 namespace GUI_Ambari.Properties
 {
 {

+ 2 - 2
contrib/ambari-scom/msi/src/GUI/Properties/Settings.settings → contrib/ambari-scom/msi/src/GUI_Ambari/Properties/Settings.settings

@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='utf-8'?>
+<?xml version="1.0" encoding="utf-8"?>
 <!-- Licensed to the Apache Software Foundation (ASF) under one or more
 <!-- Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 this work for additional information regarding copyright ownership.
@@ -11,7 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 See the License for the specific language governing permissions and
 limitations under the License. -->
 limitations under the License. -->
-
+<!-- test -->
 <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
 <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
   <Profiles>
   <Profiles>
     <Profile Name="(Default)" />
     <Profile Name="(Default)" />

+ 0 - 92
contrib/ambari-scom/msi/src/Result/Ambari_Result.csproj

@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-     http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License. -->
-
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{94F51376-8532-48EE-8897-3F9A46B39702}</ProjectGuid>
-    <OutputType>WinExe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Ambari_Result</RootNamespace>
-    <AssemblyName>Ambari_Result</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Deployment" />
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <EmbeddedResource Include="Properties\Resources.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <Compile Include="Properties\Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
-    <None Include="Properties\Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
-    <Compile Include="Properties\Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="App.config" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>

+ 0 - 19
contrib/ambari-scom/msi/src/Result/App.config

@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-     http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License. -->
-
-<configuration>
-    <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
-    </startup>
-</configuration>

+ 0 - 43
contrib/ambari-scom/msi/src/Result/Program.cs

@@ -1,43 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace Ambari_Result
-{
-    static class Program
-    {
-        [STAThread]
-        static void Main()
-        {
-            string file = Environment.GetEnvironmentVariable("tmp") + @"\ambari_failed.txt";
-            if (File.Exists(file))
-            {
-                string text = File.ReadAllText(file);
-                DialogResult result = MessageBox.Show("Uninstallation on next nodes failed.\r\nPlease proceed with manual uninstallation for these nodes\r\n" + text, "Ambari-SCOM Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1,MessageBoxOptions.DefaultDesktopOnly);
-                if (result == DialogResult.OK)
-                {
-                    Environment.Exit(0);
-                }
-            }
-        }
-    }
-}

+ 0 - 52
contrib/ambari-scom/msi/src/Result/Properties/AssemblyInfo.cs

@@ -1,52 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Ambari_Result")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Ambari_Result")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("d4bd1fc6-b566-4d42-b82e-e0f502cd9dfe")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 87
contrib/ambari-scom/msi/src/Result/Properties/Resources.Designer.cs

@@ -1,87 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.18052
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Ambari_Result.Properties
-{
-
-
-    /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
-    /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources
-    {
-
-        private static global::System.Resources.ResourceManager resourceMan;
-
-        private static global::System.Globalization.CultureInfo resourceCulture;
-
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources()
-        {
-        }
-
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager
-        {
-            get
-            {
-                if ((resourceMan == null))
-                {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ambari_Result.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture
-        {
-            get
-            {
-                return resourceCulture;
-            }
-            set
-            {
-                resourceCulture = value;
-            }
-        }
-    }
-}

+ 0 - 130
contrib/ambari-scom/msi/src/Result/Properties/Resources.resx

@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-     http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License. -->
-
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 45
contrib/ambari-scom/msi/src/Result/Properties/Settings.Designer.cs

@@ -1,45 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.18052
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Ambari_Result.Properties
-{
-
-
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-
-        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
-        public static Settings Default
-        {
-            get
-            {
-                return defaultInstance;
-            }
-        }
-    }
-}

+ 0 - 20
contrib/ambari-scom/msi/src/Result/Properties/Settings.settings

@@ -1,20 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-     http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License. -->
-
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
-</SettingsFile>

+ 9 - 6
contrib/ambari-scom/msi/src/ambari-scom.wxs

@@ -17,18 +17,19 @@ limitations under the License. -->
         <Package Comments="This installer database contains the logic and data required to install Apache Ambari-SCOM." Compressed="yes" Description="Ambari-SCOM" InstallerVersion="100" Languages="1033" Manufacturer="Apache" Platform="x86" />
         <Package Comments="This installer database contains the logic and data required to install Apache Ambari-SCOM." Compressed="yes" Description="Ambari-SCOM" InstallerVersion="100" Languages="1033" Manufacturer="Apache" Platform="x86" />
 		<Binary Id="GUI" SourceFile="SourceDir\bin\GUI_Ambari.exe" />
 		<Binary Id="GUI" SourceFile="SourceDir\bin\GUI_Ambari.exe" />
 		<Binary Id="WixCA" SourceFile="SourceDir\bin\wixca" />
 		<Binary Id="WixCA" SourceFile="SourceDir\bin\wixca" />
-		<Binary Id="Result" SourceFile="SourceDir\bin\Ambari_Result.exe" />
-        <Condition Message="You need to be an administrator to install this product.">Privileged</Condition>
+		<Condition Message="You need to be an administrator to install this product.">Privileged</Condition>
 		<CustomAction Id="INSTINTERRUPT" Error="Installation interrupted by user" />
 		<CustomAction Id="INSTINTERRUPT" Error="Installation interrupted by user" />
         <CustomAction Id="INSTSUCCESS" Error="Installation completed succesfully" />
         <CustomAction Id="INSTSUCCESS" Error="Installation completed succesfully" />
         <CustomAction Id="INSTFAILED" Error="Installation failed. Please see installation log for details: [TARGETDIR]AmbariInstallFiles\AmbariSetupTools\ambari.winpkg.install.log" />
         <CustomAction Id="INSTFAILED" Error="Installation failed. Please see installation log for details: [TARGETDIR]AmbariInstallFiles\AmbariSetupTools\ambari.winpkg.install.log" />
 		<CustomAction Id="SET_AMB_LAYOUT" Property="AMB_LAYOUT" Value="[%APPDATA]\amb_install\ambariproperties.txt" />
 		<CustomAction Id="SET_AMB_LAYOUT" Property="AMB_LAYOUT" Value="[%APPDATA]\amb_install\ambariproperties.txt" />
-        <CustomAction Id="GUI" BinaryKey="GUI" ExeCommand="" />
+        <CustomAction Id="GUI" BinaryKey="GUI" ExeCommand="gui" />
         <CustomAction Id="InstallCommand" Property="InstallDeferred" Value="&quot;cmd.exe&quot; /c &quot;set START_SERVICES=[START_SERVICES] &amp;&amp; set HDP_LAYOUT=[HDP_LAYOUT] &amp;&amp; set AMB_LAYOUT=[AMB_LAYOUT] &amp;&amp; [AMBARI_SETUP_TOOLS]bootstrap_install.cmd [AMBARI_SETUP_TOOLS]&quot;" />
         <CustomAction Id="InstallCommand" Property="InstallDeferred" Value="&quot;cmd.exe&quot; /c &quot;set START_SERVICES=[START_SERVICES] &amp;&amp; set HDP_LAYOUT=[HDP_LAYOUT] &amp;&amp; set AMB_LAYOUT=[AMB_LAYOUT] &amp;&amp; [AMBARI_SETUP_TOOLS]bootstrap_install.cmd [AMBARI_SETUP_TOOLS]&quot;" />
         <CustomAction Id="InstallDeferred" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" />
         <CustomAction Id="InstallDeferred" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" />
         <CustomAction Id="UninstallCommand" Property="UninstallDeferred" Value="&quot;cmd.exe&quot; /c &quot;[AMBARI_SETUP_TOOLS]bootstrap_uninstall.cmd [AMBARI_SETUP_TOOLS]&quot;" />
         <CustomAction Id="UninstallCommand" Property="UninstallDeferred" Value="&quot;cmd.exe&quot; /c &quot;[AMBARI_SETUP_TOOLS]bootstrap_uninstall.cmd [AMBARI_SETUP_TOOLS]&quot;" />
         <CustomAction Id="UninstallDeferred" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" />
         <CustomAction Id="UninstallDeferred" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" />
-		<CustomAction Id="Result" BinaryKey="Result" ExeCommand="" Execute="deferred" />
+		<CustomAction Id="Result" BinaryKey="GUI" ExeCommand="install" Execute="deferred" />
+		<CustomAction Id="Result_rem" BinaryKey="GUI" ExeCommand="uninstall" Execute="deferred" />
+		<CustomAction Id="Database" BinaryKey="GUI" ExeCommand="db" Execute="deferred" />
         <Directory Id="TARGETDIR" Name="SourceDir">
         <Directory Id="TARGETDIR" Name="SourceDir">
             <Directory Id="FromDir" Name="AmbariInstallFiles" ShortName="d6tzoyaf">
             <Directory Id="FromDir" Name="AmbariInstallFiles" ShortName="d6tzoyaf">
                 <Directory Id="PACKAGE_HOME" Name="AmbariPackages" ShortName="98sctbni">
                 <Directory Id="PACKAGE_HOME" Name="AmbariPackages" ShortName="98sctbni">
@@ -61,7 +62,9 @@ limitations under the License. -->
             <Custom Action="UninstallDeferred" Sequence="1502">Installed</Custom>
             <Custom Action="UninstallDeferred" Sequence="1502">Installed</Custom>
             <Custom Action="InstallCommand" Sequence="4003">NOT Installed</Custom>
             <Custom Action="InstallCommand" Sequence="4003">NOT Installed</Custom>
             <Custom Action="InstallDeferred" Sequence="4004">NOT Installed</Custom>
             <Custom Action="InstallDeferred" Sequence="4004">NOT Installed</Custom>
-			<Custom Action="Result" Sequence="6500">REMOVE</Custom>
+			<Custom Action="Result" Sequence="6500">NOT Installed</Custom>
+			<Custom Action="Result_rem" Sequence="6500">REMOVE</Custom>
+			<Custom Action="Database" Sequence="6510">NOT Installed</Custom>
             <LaunchConditions Sequence="100" />
             <LaunchConditions Sequence="100" />
             <ValidateProductID Sequence="700" />
             <ValidateProductID Sequence="700" />
             <CostInitialize Sequence="800" />
             <CostInitialize Sequence="800" />
@@ -91,4 +94,4 @@ limitations under the License. -->
             <Custom Action="GUI" Sequence="500">NOT Installed</Custom>
             <Custom Action="GUI" Sequence="500">NOT Installed</Custom>
         </InstallUISequence>
         </InstallUISequence>
     </Product>
     </Product>
-</Wix>
+</Wix>