[cvsnt] Re: Problem with xcopy in postcommand scirpt

Bo Berglund bo.berglund at telia.com
Sat Jun 11 06:43:59 BST 2005


On Fri, 10 Jun 2005 17:23:23 -0700, "Matt Schuckmann"
<matthew_schuckmann at amat.com> wrote:

>Here is the line I added to postcommand
>^Documents.* e:/DATA/scripts/UpDocWeb.bat
>
>
>Here is the batch file I've created:
>
>@echo on
>@echo '*** Running UpDocWeb.bat ***'
>IF %2 equ commit ( GOTO UPDATE ) ELSE ( GOTO DONE )
>
>:UPDATE
>@echo '*** Updating Documents Mirror ***'
>e:
>pushd e:\DATA\Mirror\Documents
>c:\progra~1\cvsnt\cvs.exe -Q up
>c:\windows\system32\xcopy.exe /i /s /e /d /y E:\DATA\Mirror\Documents
>Z:\Software\Mirror\Documents\
>popd
>
>:DONE
>

You can't use mapped drive letters (Z) in a script that runs by the
cvsnt service. Drive letter mappings are per-user on their login and
so will not be observed by the cvsnt service.
I don't think that the service is at all able to access the network
even given tha it normally runs as LOCALSYSTEM.

One idea could be to add a line at the beginning of the batch script
with a net use command where you specify both user account and the
account password. Then at the end you could use the net command to
discard the mapping.
Note that this means that you are putting an account password in
cleartext into a batch file though...

Finally, I can't see how the %2 parameter gets set to anything in your
postcommand script entry, but it controls what your batch file does.
Maybe that was a posting omission?


/Bo
(Bo Berglund, developer in Sweden)



More information about the cvsnt mailing list