For some reason a lot of my command and batch deployments never function when I deploy them through Lansweeper. Simple commands like updating a registry seem to work fine, but one that has multiple steps always seems to fail. I've executed the .bat files without issues on multiple computers and am able to run just the code in the cmd window and again it works fine. But always fails when deployed through lansweeper.. Here is a example that fails when I try to deploy through batch or command:
cd %appdata%\Mozilla\Firefox\Profiles\*default*
type prefs.js | findstr /v "app.update.auto" | findstr /v "app.update.enabled" > output.js
move /Y output.js prefs.js
echo user_pref("app.update.enabled", true); >> prefs.js
echo user_pref("app.update.auto", true); >> prefs.js
All this command is supposed to do is delete two lines if they exist, and then replace them with two new lines in a .js file. The purpose of this is to turn on auto-updates in firefox for all the computers in our office.