\r
Dim filter, FiltersObj, LoadOrder, FilterArray, FilterItem\r
\r
+ On Error Resume Next\r
Set FiltersObj = GetObject(IISPath & "/Filters")\r
+ if IsNull(FiltersObj) then\r
+ exit sub\r
+ end if\r
+\r
+ On Error Resume Next\r
LoadOrder = FiltersObj.FilterLoadOrder\r
+ if IsNull(LoadOrder) then\r
+ exit sub\r
+ end if\r
\r
for each filter in FiltersObj\r
if (filter.Class = "IIsFilter") then\r
Dim fileExtension\r
Dim existsFlag\r
\r
+ On Error Resume Next\r
ScriptMaps = siteObj.ScriptMaps\r
+ if IsNull(ScriptMaps) then\r
+ exit sub\r
+ end if\r
redim newScriptMaps(0)\r
lineIndex = 0\r
'copy each entry from the old ScriptMaps to newScriptMaps\r
\r
End Sub\r
\r
+Sub PerformUninstall()\r
\r
'*** Begin Main Code ***\r
Dim WebObj\r
Dim InstallDir\r
-Dim FileSystemObj\r
Dim ShibISAPIPath\r
-Dim site, siteObj, sitePath, LogFile\r
+Dim site, siteObj, sitePath\r
+\r
+On Error Resume Next\r
\r
' First of all look for the FileExtension\r
Set WshShell = CreateObject("WScript.Shell")\r
+if (Err <> 0) then\r
+ exit sub\r
+End if\r
+\r
\r
'Get the INSTALLDIR value via CustomActionData\r
+On Error Resume Next\r
InstallDir = Session.Property("CustomActionData")\r
-\r
-Set FileSystemObj = CreateObject("Scripting.FileSystemObject")\r
-\r
-'Set LogFile = FileSystemObj.OpenTextFile(InstallDir & "\var\log\shibboleth\Installer.log", 8, true)\r
+if (Err <> 0) then\r
+ exit sub\r
+End if\r
\r
On Error Resume Next\r
regValue = WshShell.RegRead("HKLM\SOFTWARE\Shibboleth\FileExtension")\r
if (Err = 0) then\r
\r
- ' If (LogFile) then\r
- ' LogFile.WriteLine "Uninstall IIS plugin - upgrade detected by uninstall script, skipping"\r
- 'End If\r
' Registry key is still there - this is an upgrade, so exit\r
\r
else \r
' Key is gone - a pure uninstall\r
- 'If (LogFile) then\r
- ' LogFile.WriteLine "Uninstall IIS plugin"\r
- 'End If\r
\r
'Don't show errors, we'll handle anything important\r
On Error Resume Next\r
' Got the IIS Object\r
End If\r
' Sense whether this is an upgrade\r
-end if
\ No newline at end of file
+end if\r
+\r
+End Sub\r
+\r
+PerformUninstall()
\ No newline at end of file