Errors with Script to Uninstall Old Versions of Firefox
Most of our computers have various old versions of Firefox. I created a script that uninstalls Firefox, removes the firefox folder and then runs install.cmd to install version 15. I was successful when I was doing it the same way with version 14 but now the current version is 15 and all I did was change the dependency file with version 15.
This is the error in the logfile:
The error I got in the logfile is:
Error creating process: $(KACE_DEPENDENCY_DIR\install.cmd : (2) The system cannot find the file specified.
The file is THERE and if I just run it manually on the computer it will install Firefox 15. I am baffled.
<verify on_failure="break" attempts="1">
<file_version_less_than path="C:\Program Files\Mozilla Firefox\" file="firefox.exe" expectedValue="15" />
<on_verify_success>
<launch_program path="C:\Program Files\Mozilla Firefox\uninstall" program="helper.exe" wait="true" parms="/S" />
<launch_program path="SYS" program="cmd.exe" wait="true" parms="/C rd /S /Q "C:\program files\mozilla firefox"" />
<launch_program path="$(KACE_DEPENDENCY_DIR)" program="install.cmd" wait="true" parms="" />
install.cmd has these lines:
echo Installing Firefox - Please Wait.
echo Window will close after install is complete
REM Install Firefox 15.0
"%~dp0Firefox_Setup_15.0.exe" -ms
REM Install 32-bit customisations
if exist "%programfiles%\Mozilla Firefox\" copy /Y "%~dp0override.ini" "%programfiles%\Mozilla Firefox\"
if exist "%programfiles%\Mozilla Firefox\" copy /Y "%~dp0mozilla.cfg" "%programfiles%\Mozilla Firefox\"
if exist "%programfiles%\Mozilla Firefox\" copy /Y "%~dp0local-settings.js" "%programfiles%\Mozilla Firefox\defaults\pref"
The error I got in the logfile is:
Error creating process: $(KACE_DEPENDENCY_DIR\install.cmd : (2) The system cannot find the file specified.
The file is THERE and if I just run it manually on the computer it install Firefox 15. I am baffled.
Thanks.
Answers (3)
The error shows no closing paren. Check your install command, it should be $(KACE_DEPENDENCY_DIR)\install.cmd
Also try mapping it out to the folder the file downloads to, something like c:\programdata\dell\kace\{scriptnumber}.
Comments:
-
I can see in the log that the ) is not there, but in the XML editor it looks like this - <launch_program path="$(KACE_DEPENDENCY_DIR)" program="install.cmd" wait="true" parms="" />
so the ending paren is there.
I did just try it with the path (c:\Documents and Settings\All Users\Dell\KACE\kbots_cache\packages\kbots\889) and that worked.
Thanks. - jfrasier 12 years ago
Just my $.02, but I would recommend using a Managed Install to dhandle this, as it will be *much* easier to track. Just zip up the uninstall/install batch with the installer, and call the batch file from the MI's command line. I do this for all my third party apps (Adobe Reader, Adobe Flash, Java, etc) and it works very well and is very easy to track. The other nice thing about MIs is the ability to have them run when a machine checks in, so you don't have to worry about machines missing a script deploy due to being off (or off the network).
John