This works if I run the commands interactively, but as usual, BigFix won’t do it. I copied this fixlet from another example that does work. What am I doing wrong?
Sounds like it could be the issue of user context vs SYSTEM context. You could verify that by either manually running the batch file in SYSTEM context (eg via psexec) or set the action to run in the user context using either runascurrentuser.exe or use the override action commands.
Might also be a problem with the 32-bit environment used by the BES client. You can put
action uses wow64 redirection false
anywhere in the script before the waithidden command to ensure you use the native version of cmd.exe and ksetup.exe
If using the native environment doesn’t work, I sometimes test running commands as the SYSTEM account using psexec to open a command shell in SYSTEM context -
The reason is that this will give you error codes for every one of those separately in the client log.
If you instead use a BAT file, then you only get a single error code, which wouldn’t be a major issue in this case since all lines of the BAT file are doing something similar, but in other cases you would only get the error code for the last item in the BAT file to execute rather than an error code for everything.