home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Software / Freeware / Programare / Sharp / SharpDevelop_1.0.3.1761_Setup.exe / PreUninstallTasks.vbs < prev    next >
Text File  |  2004-10-07  |  954b  |  39 lines

  1. Dim WshShell
  2. Set WshShell = CreateObject("WScript.Shell")
  3. WshShell.CurrentDirectory = GetSetupPath()
  4.  
  5. WScript.Echo "Removing shared assemblies from the GAC" & vbCrLf
  6.  
  7. WScript.Echo "ICSharpCode.SharpZipLib.dll"
  8. RemoveFromGAC "..\ICSharpCode.SharpZipLib.dll"
  9.  
  10. WScript.Echo "NUnit.Core.dll"
  11. RemoveFromGAC "..\nunit.core.dll"
  12.  
  13. WScript.Echo "NUnit.Framework.dll"
  14. RemoveFromGAC "..\nunit.framework.dll"
  15.  
  16. ' SHARED FUNCTIONS
  17.  
  18. Public Sub RemoveFromGAC(strAssemblyRelativePath)
  19.   Execute "..\tools\gacutil2.exe /u:" & strAssemblyRelativePath
  20. End Sub
  21.  
  22. Public Sub Execute(strProgram)
  23.   Dim oExec
  24.  
  25.   Set oExec = WshShell.Exec(strProgram)
  26.  
  27.   Do While oExec.Status = 0
  28.     WScript.Sleep 100
  29.   Loop
  30.  
  31.   WScript.Echo oExec.StdOut.ReadAll
  32. End Sub
  33.  
  34. Public Function GetSetupPath()
  35.   Dim strSetupDirPath
  36.   strSetupDirPath = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\"))
  37.   GetSetupPath = strSetupDirPath
  38. End Function
  39.