winsdk: Hide runtime in programs and features
authorLenny Komow <lenny@lunarg.com>
Tue, 18 Jul 2017 17:20:05 +0000 (11:20 -0600)
committerLenny Komow <lenny@lunarg.com>
Wed, 19 Jul 2017 18:51:46 +0000 (12:51 -0600)
Change-Id: Ibc5028f660c91f66d986af19f6c7959eb9b55359

windowsRuntimeInstaller/InstallerRT.nsi

index e35008c..5bc2098 100644 (file)
@@ -409,15 +409,10 @@ Section
 
     # Set SystemComponent to 1 for those instances that are not to be visible to Add/Remove Programs.
     # Set SystemComponent to 0 for the instance that is to be visible to Add/Remove Programs.
-    ${If} $IC > 2
-        IntOp $1 $IC - 1
-        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}-$IC" "SystemComponent" 0
-        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}-$1" "SystemComponent" 1
-    ${ElseIf} $IC = 2
-        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}-$IC" "SystemComponent" 0
-        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "SystemComponent" 1
+    ${If} $IC > 1
+        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}-$IC" "SystemComponent" 1
     ${Else}
-        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "SystemComponent" 0
+        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "SystemComponent" 1
     ${EndIf}
 
     StrCpy $1 25
@@ -567,9 +562,9 @@ Section "uninstall"
     ${EndIf}
     ${If} $IC > 2
         IntOp $IC $IC - 1
-        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}-$IC" "SystemComponent" 0
+        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}-$IC" "SystemComponent" 1
     ${ElseIf} $IC = 2
-        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "SystemComponent" 0
+        WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "SystemComponent" 1
     ${Else}
         # Last uninstall
         IntOp $IC $IC - 1