Commit 9ddf80e5009b40c1b81e9d57a3a8423c65fcf476

Authored by Jarrett Jordaan
2 parents e60e0f8d e61107c3

Merge branch 'edge' of git@github.com:ktgit/knowledgetree into edge

Showing 1 changed file with 15 additions and 16 deletions
dmsctl.vbs
... ... @@ -5,7 +5,7 @@
5 5 '
6 6  
7 7 ' Service Name Consts
8   -Const KTOFFICE = "KTOpenOffice"
  8 +Const KTOFFICE = "KTOpenoffice"
9 9 Const KTSCHEDULER = "KTScheduler"
10 10 Const KTLUCENE = "KTLucene"
11 11  
... ... @@ -56,23 +56,23 @@ For Each objOperatingSystem in colOperatingSystems
56 56 Next
57 57  
58 58 Public Function isWindowsVista()
59   - isWin = false
  59 + isWindowsVista = false
60 60 If left(currOS, 19) = "Microsoft Windows Vista" Then
61   - isWin = TRUE
  61 + isWindowsVista = TRUE
62 62 End If
63 63 End Function
64 64  
65 65 Public Function isWindows7()
66   - isWin = false
  66 + isWindows7 = false
67 67 If left(currOS, 19) = "Microsoft Windows 7" Then
68   - isWin = TRUE
  68 + isWindows7 = TRUE
69 69 End If
70 70 End Function
71 71  
72 72 Public Function isWindows2008()
73   - isWin = false
74   - If left(currOS, 19) = "Microsoft Windows 2008" Then
75   - isWin = TRUE
  73 + isWindows2008 = false
  74 + If mid(currOS, 27, 42) = "2008 Enterprise" Then
  75 + isWindows2008 = TRUE
76 76 End If
77 77 End Function
78 78  
... ... @@ -91,7 +91,7 @@ End Sub
91 91 dim objArgs, errMsg, result, strUsage, isSuccess
92 92  
93 93 strUsage = "USAGE:" &_
94   -"dmsctl.bat <start|stop|restart|install|uninstall> [servicename]" & vbNewLine &_
  94 +"dmsctl.vbs <start|stop|restart|install|uninstall> [servicename]" & vbNewLine &_
95 95 vbNewLine &_
96 96 "help - this screen " & vbNewLine &_
97 97 "start - start the services" & vbNewLine &_
... ... @@ -652,13 +652,12 @@ End Sub
652 652  
653 653 ' Event logging only works on Server 2003, 2000 and XP
654 654 Public Sub logEvent(ByVal strMessage)
655   -
656   - If (NOT isWindowsVista() AND NOT isWindows7 AND NOT isWindows2008) Then
657   - Const EVENT_SUCCESS = 0
658   - Set objShell = Wscript.CreateObject("Wscript.Shell")
659   - objShell.LogEvent EVENT_SUCCESS, strMessage
660   - End If
661   -
  655 + ' Disabled until Windows Vista detection has been tested.
  656 + 'If (NOT isWindowsVista() AND NOT isWindows7() AND NOT isWindows2008()) Then
  657 + ' Const EVENT_SUCCESS = 0
  658 + ' Set objShell = Wscript.CreateObject("Wscript.Shell")
  659 + ' objShell.LogEvent EVENT_SUCCESS, strMessage
  660 + 'End If
662 661 End Sub
663 662  
664 663 ' Event logging only works on Server 2003, 2000 and XP
... ...