home *** CD-ROM | disk | FTP | other *** search
- button=Msgbox ("You are about to uninstall Home Page Rotator - click OK to continue or Cancel to abort",1)
-
- if button <> 1 then Stop
-
- set fso=CreateObject("Scripting.FileSystemObject")
- Set WshShell = WScript.CreateObject("WScript.Shell")
-
- 'Get folder names
- Set WshSysEnv = WshShell.Environment("PROCESS")
- ProgFolder=WshSysEnv("ProgramFiles")
- ProgFolder =ProgFolder & "\HomePageRotator"
-
- Set WshSysEnv = WshShell.Environment("PROCESS")
- Rotatefile=WshSysEnv("SystemRoot") & "\System32\rotate.vbs"
-
- 'delete folder
- if fso.folderexists(ProgFolder) then
- fso.deletefolder "C:\Program Files\HomePageRotator",true
- end if
-
- 'Delete existing task if any
- cmdline ="schtasks /delete /tn ""Home Page Rotate"" /f"
- set sched=wshShell.exec(cmdline)
- do while sched.status=0
- wscript.sleep 100
- loop
-
- 'delete file
- if fso.FileExists(Rotatefile) then
- fso.DeleteFile(Rotatefile)
- end if
-
- 'undo redistry
- WshShell.RegDelete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\Add page to home page rotation\"
-
-
-
- Msgbox "uninstall complete"