Bring forward 2.4.3 installer. Update version information. Change ComponentId and...
authorRod Widdowson <rdw@steadingsoftware.com>
Mon, 2 Apr 2012 15:28:30 +0000 (15:28 +0000)
committerRod Widdowson <rdw@steadingsoftware.com>
Mon, 2 Apr 2012 15:28:30 +0000 (15:28 +0000)
msi/scripts/shib_uninstall_isapi_filter.vbs
msi/shibboleth-sp-win32.wsi
msi/shibboleth-sp-win64.wsi

index 1eba320..c009e2a 100644 (file)
@@ -78,48 +78,57 @@ Dim InstallDir
 Dim ShibISAPIPath
 Dim site, siteObj, sitePath
 
-
-'Don't show errors, we'll handle anything important
+' First of all look for the FileExtension
+Set WshShell = CreateObject("WScript.Shell")
 On Error Resume Next
-
-'Attempt to get W3SVC.  If failure, end script (e.g. IIS isn't available)
-Set WebObj = GetObject("IIS://LocalHost/W3SVC")
+regValue = WshShell.RegRead("HKLM\SOFTWARE\Shibboleth\FileExtension")
 if (Err = 0) then
+  ' Registry key is still there - this is an upgrade, so exit
+
+else 
+  ' Key is gone - a pure uninstall
+
+  'Don't show errors, we'll handle anything important
+  On Error Resume Next
+
+  'Attempt to get W3SVC.  If failure, end script (e.g. IIS isn't available)
+  Set WebObj = GetObject("IIS://LocalHost/W3SVC")
+  if (Err = 0) then
+
+    'Get the INSTALLDIR value via CustomActionData
+    InstallDir = Session.Property("CustomActionData")
+
+    'Remove all trailing backslashes to normalize
+    do while (mid(InstallDir,Len(InstallDir),1) = "\")
+      InstallDir = mid(InstallDir,1,Len(InstallDir)-1)
+    loop
+    ShibISAPIPath = InstallDir & "\lib\shibboleth\isapi_shib.dll"
+
+    'Delete ISAPI Filter
+    'First do the master service
+    DeleteISAPIFilters "IIS://LocalHost/W3SVC",ShibISAPIPath
+    'Now do the websites
+    for each site in WebObj
+      if (site.Class = "IIsWebServer") then
+        sitePath = "IIS://LocalHost/W3SVC/" & site.Name
+        DeleteISAPIFilters sitePath,ShibISAPIPath
+      end if
+    next
+
+    'Delete File Extensions
+    'First do the master service
+    DeleteFileExtensions WebObj,ShibISAPIPath
+    'Now do the websites
+    for each site in WebObj
+      if (site.Class = "IIsWebServer") then
+        set siteObj = GetObject("IIS://LocalHost/W3SVC/" & site.Name & "/ROOT")
+        DeleteFileExtensions siteObj,ShibISAPIPath
+      end if
+    next
 
-  'Get the INSTALLDIR value via CustomActionData
-  InstallDir = Session.Property("CustomActionData")
-
-  'Remove all trailing backslashes to normalize
-  do while (mid(InstallDir,Len(InstallDir),1) = "\")
-    InstallDir = mid(InstallDir,1,Len(InstallDir)-1)
-  loop
-  ShibISAPIPath = InstallDir & "\lib\shibboleth\isapi_shib.dll"
-
-  'Delete ISAPI Filter
-  'First do the master service
-  DeleteISAPIFilters "IIS://LocalHost/W3SVC",ShibISAPIPath
-  'Now do the websites
-  for each site in WebObj
-    if (site.Class = "IIsWebServer") then
-      sitePath = "IIS://LocalHost/W3SVC/" & site.Name
-      DeleteISAPIFilters sitePath,ShibISAPIPath
-    end if
-  next
-
-  'Delete File Extensions
-  'First do the master service
-  DeleteFileExtensions WebObj,ShibISAPIPath
-  'Now do the websites
-  for each site in WebObj
-    if (site.Class = "IIsWebServer") then
-      set siteObj = GetObject("IIS://LocalHost/W3SVC/" & site.Name & "/ROOT")
-      DeleteFileExtensions siteObj,ShibISAPIPath
-    end if
-  next
-
-
-  'Delete Web Services Extension (universal, no need to do for each site)
-  WebObj.DeleteExtensionFileRecord ShibISAPIPath
-
-'Last end if
+    'Delete Web Services Extension (universal, no need to do for each site)
+    WebObj.DeleteExtensionFileRecord ShibISAPIPath
+  ' Got the IIS Object
+  End If
+' Sense whether this is an upgrade
 end if
\ No newline at end of file
index 9268f3d..9dc321a 100644 (file)
Binary files a/msi/shibboleth-sp-win32.wsi and b/msi/shibboleth-sp-win32.wsi differ
index 70caa9a..83f8a7b 100644 (file)
Binary files a/msi/shibboleth-sp-win64.wsi and b/msi/shibboleth-sp-win64.wsi differ