Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
828 B

  1. Function RestoreFiles()
  2. dim fso
  3. dim strWindows
  4. dim strNewName
  5. dim strCurrentName
  6. on error resume next
  7. set fso = createobject( "scripting.filesystemobject" )
  8. if not fso is nothing then
  9. ' get the path to the windows folder
  10. strWindows = Session.Property( "WindowsFolder" )
  11. if strWindows is nothing then
  12. ' MSI session did not give the value properly
  13. ' so try to get the same information from API
  14. strWindows = fso.GetSpecialFolder( 0 ) & "\"
  15. end if
  16. ' prepare the file paths
  17. strNewName = strWindows & "Help\suptools.chm"
  18. strCurrentName = strWindows & "Help\suptoolsold.chm"
  19. if fso.FileExists( strNewName ) then
  20. fso.DeleteFile strNewName, true
  21. end if
  22. fso.MoveFile strCurrentName, strNewName
  23. set fso = nothing
  24. end if
  25. RestoreFiles = 1
  26. End Function