[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using vbscript from loginfo

From: FreudJ76
Subject: using vbscript from loginfo
Date: 10 Jan 2006 09:00:52 -0800
User-agent: G2/0.2


I am trying to force all CVS users enter a log message during commits.
We are using CVSNT on Windows platform, so what I thought I could do
was to write a simple vbscript that examines the message entry and if
it is "no message", quits with a non-zero exit code. The following
line is what I have in my loginfo file.

ALL cscript.exe C:\\CvsMailer\\AdminScripts\\VerifyLog.vbs

And the following is the script text. Needless to say, it doesn't do
what I want it to do. Any help would be appreciated.



'Define the variables & constants

Const ForAppending = 8

'Define the file system object that we will use for logging the log
text passed to the script

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objTextFile = objFSO.OpenTextFile _

    ("C:\WUTemp\Log.txt", ForAppending, True)

'Parse the argument and assign the log text argument to a string

Set objArgs = WScript.Arguments

For I = 0 to objArgs.Count - 1

   objTextFile.WriteLine(objArgs(I) & vbTab)

   strLogTxt = objArgs(I)



'If the text is empty, exit with non-zero exit code, if it is not, exit
with zero exit code

If StrLogTxt = "no message" Then

            Wscript.Quit (1)


            Wscript.Quit (0)

End If

reply via email to

[Prev in Thread] Current Thread [Next in Thread]