Hi,
When I execute a shell script on UNIX or Linux, and perform a "whoami" command, the result is the user I used to connect to the agent to, regardless of whether I user "-usr {user} -pw {password}" or "-er {dfofile.dfo}".
However, when I execute a .bat file on a Windows agent, and perform a "set" command, the "USERNAME" environment variable is not the user I connected to the agent with. Instead, the user is the machine name with a "$" appended at the end 9eg. if my computer name was
computername, the USERNAME variable from the "set" command will be
computername$. This happens regardless of whether I use "-usr {user} -pw {password}" or "-er {dfofile.dfo}".
My problem is that I'm getting an Access Violation from a Delphi program (similar to a Java NullpointerException" but only when I run my script through the agent. When I run it from the command line outside of Harvest, it works fine. I suspect the user used to run the batch file might have something to to with it.
Any suggestions would be appreciated.
Kind regards,
Jarus
------------------------------
Jarus Bosman
Senior Software Developer
State Information Technology Agency
South Africa
------------------------------