Problem with script - running VB command from wscript.shell object in Win2008 server

Hi folks,

Looking for a flash of insight from somebody who knows more about windows servers and VB code in LotusScript than I do (which is basically anybody).

I’ve got an a scheduled agent that does lots of stuff on a server that runs as a service with a given user ID’s credentials. The server is never logged in.

The problem is occurring with the following block of code (stripped down to make it readable):

Set Sh = createobject(“WScript.Shell”)

Set FSO = createobject(“Scripting.FileSystemObject”)

fOut = “c:\temp\tmp.txt”

sCmd = |\MyServer\Software\ClearCase\calldos2unix.bat \AnotherServer\release\Testing\test.txt > c:\temp\tmp.txt|

Sh.Run sCmd, 0, True

The system then has some stuff to try to pull the output out of the output file, but I have verified that the agent just hangs at this point. No errors, no boxes popping up on the screen, nothing. My only thought is that it is something to do with UAC (which I know next to nothing about other than the fact that the server prompts me every time I move the mouse if I’m logged into it and this makes alarm bells go off in my head), but it could be something else. The code works fine when I execute it on my windows XP box, and if I execute

\MyServer\Software\ClearCase\calldos2unix.bat \AnotherServer\release\Testing\test.txt > c:\temp\tmp.txt

from a dos prompt on the domino server it works too.

So, I think I’m missing something that is preventing the VB code from doing its thing. Any suggestions?

Things that might help:

  • The domino server is on Windows 2008 32 bit edition - not the 64 bit one.

  • The ID that is running the service is in the local administrators group on the box, but for some reason can’t create files in the root of c. c:\temp is fine though.

  • If I run it as a scheduled agent it just hangs the agent manager and the ‘tell amgr cancel’ command won’t stop the agent. You need to restart the server to get agents running again.

  • When this happens, process explorer doesn’t show any processes being spawned by amgr

  • I’m wearing a blue shirt if that makes any difference.

I’ll take anything.

-Brendan