Hugo – I’m not sure that this is really a question about BatchPatch so much as it’s a question about environment variables. I’m not an expert on environment variables.
BatchPatch can execute remote commands, as you know. So it’s just a question of finding the correct command to execute.
I did a quick google search on environment variables, and from what I found the “SET” command only sets current session variables. If you want to set a system variable you have to use “SETX” instead. It also says that updates made with SETX will only be visible to the next logon session, which essentially means that if you use BatchPatch to add/update a variable on ComputerX, then on ComputerX you will not see this change until/unless you logoff and log back on to ComputerX to verify it.
That said, in BatchPatch I simply highlighted my target host(s) and created a remote command with the following syntax:
SETX client myfqdn
I then executed the command in BatchPatch and it reported “Exit Code: 0 (SUCCESS).” So, I logged on to the remote system to verify it was there. On the remote system I opened a cmd prompt and typed “SET” and I could see the value that I set previously was visible.
-Doug