We have a fixlet to install Sophos cloud client but we also need another fixlet/task that will run a command to point our servers to the right message relay, however, the cmd needs to be in the directory when we run the command manually so I wasn’t sure if my below action script would work as I think it would.
It’s not clear to me whether you’re saying that the above action script does not work, or if you haven’t tried it. If it doesn’t work, does it fail on a particular line? Any idea how far it’s getting?
If your issue is that the command needs to be run from the directory the SophosSetup.exe executable is in, I’d suggest making a createfile that first does a cd into the root of C and then runs your last line.
Thanks alinder so the script is copying the executable to the C drive, but it looks like the last line its just sitting at running forever until I stop it and doesn’t actually install Sophos. Does something look off about this script I made? Maybe its not actually getting into the C: like the create file specifies?
You don’t actually seem to be doing anything with the createfile? Remember this just creates a file called __createfile that you then need to manipulate. It doesn’t actually do anything
Also if you run that file you change drives to “C:” but then that goes away for the next command in the actionscript. You would need to do all this in one line for a change directory to affect the command.
createfile until end
cd c:
cmd.exe /C "C:\SophosSetup.exe --messagerelays=172.25.150.35:8190"
end
delete "C:SophosInstall.bat"
copy __createfile "C:\SophosInstall.bat"
run SophosInstall.bat
delete “C:\SophosSetup.exe”
yeah thats what Im trying now actually but it doesn’t seem to be completing the install. I see the Sophos setup appear in task manager processes but never actually installs. Maybe it needs user interaction normally? Usually for an exe when making a fixlet I would add a /S or something, but doesn’t seem to work in this case because Im making a create file to add the relay part.