spexplorerfast.vbs 605 B

1234567891011121314151617181920212223
  1. base_dir = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\"))
  2. version_path = base_dir & "active.txt"
  3. version = ReadVersion(version_path)
  4. bin_path = base_dir & version & "\bin\spshell.exe"
  5. Run bin_path
  6. Sub Run(ByVal sFile)
  7. Dim shell
  8. Set shell = CreateObject("WScript.Shell")
  9. shell.Run Chr(34) & sFile & Chr(34), 1, false
  10. Set shell = nothing
  11. End Sub
  12. Function ReadVersion(sFile)
  13. Dim fs
  14. Dim tfs
  15. Set fs = CreateObject("Scripting.FileSystemObject")
  16. Set tfs = fs.OpenTextFile(sFile, 1, True)
  17. ReadVersion = Trim(tfs.ReadLine)
  18. tfs.Close
  19. Set tfs = Nothing
  20. Set fs = Nothing
  21. End Function