Firefox install - Always states running even after install completes

So My Firefox script never gives me a completed status.
The Action Reads:
Action Script
Script Type BigFix Action Script

// ---------------------------------------------EDITING INSTRUCTIONS---------------------------------------------------------------------
// When editing this task through the Manage Software Distribution Packages dashboard, you will have the option to preserve any custom edits you make to this action.
// If you select the option to preserve custom edits, only areas bound by the comment markers ‘Preparation Marker’, ‘Command Marker’ and ‘Closing Marker’ are updated.
// To ensure that all your custom Action Script changes can be preserved, only make changes to areas that are not bound by the comment markers.
// Removing the comment markers may result in the Action Script not updating correctly during the next edit.
// See KB Article swg21668807 (https://hclpnpsupport.service-now.com/csm?id=kb_article&sysparm_article=KB0023414) for more information.
// --------------------------------------------------------------------------------------------------------------------------------------

//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=4b8ebb4c79e10395c998638c2f7bb0a10e525c44 sha1=4b8ebb4c79e10395c998638c2f7bb0a10e525c44 size=350400 url=SWDProtocol://127.0.0.1:52311/Uploads/4b8ebb4c79e10395c998638c2f7bb0a10e525c44/Firefox%20Installer%20(1).exe.bfswd sha256=86391f0cb78f6b8eca7635ba2dbff35783ba5a75668164417b86c2b56bc605d2
end prefetch block

// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter “baseFolder” = “__Download/”
// Move files into subfolders and unescape file names
move “__Download/4b8ebb4c79e10395c998638c2f7bb0a10e525c44” “{parameter “baseFolder”}Firefox Installer (1).exe”

// Log setup
parameter “mainSWDLogFolder” = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter “mainSWDLogFolder”}"
parameter “logFile” = “SWD_DeploymentResults.log”

//**End Preparation Marker
delete __createfile
parameter “logFolder” = “{parameter “mainSWDLogFolder”}”
// Run setup process
delete run.bat

// Use .bat to set working directory to packages root, for setup command.
createfile until end
@ECHO OFF
cd "{parameter “baseFolder”}"
rem // See comments at the beginning of this action for an explanation of the comment markers.
echo %DATE% %TIME% >> "{parameter “logFolder”}{parameter “logFile”}"
echo Action ID: {id of active action} >> "{parameter “logFolder”}{parameter “logFile”}"
rem //**Begin Command Marker
echo Command: “Firefox Installer (1).exe” >> "{parameter “logFolder”}{parameter “logFile”}"
set errorlevel=
“Firefox Installer (1).exe” >> “{parameter “logFolder”}{parameter “logFile”}” 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker

echo Return code: %SWDExitCode% >> "{parameter “logFolder”}{parameter “logFile”}"
echo. >> "{parameter “logFolder”}{parameter “logFile”}"
exit %SWDExitCode%
end

move __createfile run.bat
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace ‘override wait’ with ‘override run’ and ‘wait’ with ‘run’.
override wait
hidden=true
completion=job
wait run.bat

//**Begin Closing Marker
// Get the return code of the previous action.
parameter “returnCode” = “{exit code of action}”

// Task will now exit.
exit {parameter “returnCode”}
//**End Closing Marker

You haven’t specified any silent/unattended options for the command-line installer for FireFox. It’s like lol y trying to display a setup screen, which is not visible to the logged-on user so the setup.exe is stuck running.

Any idea what to put in here?

I’m away from a a computer right now, but probably the same as the FireFox upgrade Fixlets we have in “Updates for Windows Applications”. But this line is just the “echo” statement, you’ll want it on the next line that actually does the install

Looks Like i need an install INI file

I use an .INI configuration file to specify the installation directory.

  1. Create a text file called firefox.ini

  2. Add the following line and save the file

InstallDirectoryPath=x:\whatever\directory\you\want

  1. The command to run a silent install using the INI file you just created would be.

firefox.exe /INI=c:\APPS\firefox.ini

I created the INI and placed into the C:\apps folder. Reran the corrected script and now says Evaluating. What is missing?
Here is the updated script:
Action Script
Script Type BigFix Action Script

//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=4b8ebb4c79e10395c998638c2f7bb0a10e525c44 sha1=4b8ebb4c79e10395c998638c2f7bb0a10e525c44 size=350400 url=SWDProtocol://127.0.0.1:52311/Uploads/4b8ebb4c79e10395c998638c2f7bb0a10e525c44/Firefox%20Installer%20(1).exe.bfswd sha256=86391f0cb78f6b8eca7635ba2dbff35783ba5a75668164417b86c2b56bc605d2
end prefetch block

// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter “baseFolder” = “__Download/”
// Move files into subfolders and unescape file names
move “__Download/4b8ebb4c79e10395c998638c2f7bb0a10e525c44” “{parameter “baseFolder”}Firefox Installer (1).exe”

// Log setup
parameter “mainSWDLogFolder” = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter “mainSWDLogFolder”}"
parameter “logFile” = “SWD_DeploymentResults.log”

//**End Preparation Marker
delete __createfile
parameter “logFolder” = “{parameter “mainSWDLogFolder”}”
// Run setup process
delete run.bat

// Use .bat to set working directory to packages root, for setup command.
createfile until end
@ECHO OFF
cd "{parameter “baseFolder”}"
rem // See comments at the beginning of this action for an explanation of the comment markers.
echo %DATE% %TIME% >> "{parameter “logFolder”}{parameter “logFile”}"
echo Action ID: {id of active action} >> "{parameter “logFolder”}{parameter “logFile”}"
rem //**Begin Command Marker
echo Command: “Firefox Installer (1).exe” >> "{parameter “logFolder”}{parameter “logFile”}"
set errorlevel=
“Firefox Installer (1).exe” /INI=c:\APPS\firefox.ini>> “{parameter “logFolder”}{parameter “logFile”}” 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker

echo Return code: %SWDExitCode% >> "{parameter “logFolder”}{parameter “logFile”}"
echo. >> "{parameter “logFolder”}{parameter “logFile”}"
exit %SWDExitCode%
end

move __createfile run.bat
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace ‘override wait’ with ‘override run’ and ‘wait’ with ‘run’.
override wait
hidden=true
completion=job
wait run.bat

//**Begin Closing Marker
// Get the return code of the previous action.
parameter “returnCode” = “{exit code of action}”

// Task will now exit.
exit {parameter “returnCode”}
//**End Closing Marker

The Firefox Browser installs after running this script but states Running in Bigfix:
Action Script
Script Type BigFix Action Script

// ---------------------------------------------EDITING INSTRUCTIONS---------------------------------------------------------------------
// When editing this task through the Manage Software Distribution Packages dashboard, you will have the option to preserve any custom edits you make to this action.
// If you select the option to preserve custom edits, only areas bound by the comment markers ‘Preparation Marker’, ‘Command Marker’ and ‘Closing Marker’ are updated.
// To ensure that all your custom Action Script changes can be preserved, only make changes to areas that are not bound by the comment markers.
// Removing the comment markers may result in the Action Script not updating correctly during the next edit.
// See KB Article swg21668807 (https://hclpnpsupport.service-now.com/csm?id=kb_article&sysparm_article=KB0023414) for more information.
// --------------------------------------------------------------------------------------------------------------------------------------

//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=4b8ebb4c79e10395c998638c2f7bb0a10e525c44 sha1=4b8ebb4c79e10395c998638c2f7bb0a10e525c44 size=350400 url=SWDProtocol://127.0.0.1:52311/Uploads/4b8ebb4c79e10395c998638c2f7bb0a10e525c44/Firefox%20Installer%20(1).exe.bfswd sha256=86391f0cb78f6b8eca7635ba2dbff35783ba5a75668164417b86c2b56bc605d2
end prefetch block

// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter “baseFolder” = “__Download/”
// Move files into subfolders and unescape file names
move “__Download/4b8ebb4c79e10395c998638c2f7bb0a10e525c44” “{parameter “baseFolder”}Firefox Installer (1).exe”

// Log setup
parameter “mainSWDLogFolder” = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter “mainSWDLogFolder”}"
parameter “logFile” = “SWD_DeploymentResults.log”

//**End Preparation Marker
delete __createfile
parameter “logFolder” = “{parameter “mainSWDLogFolder”}”
// Run setup process
delete run.bat

// Use .bat to set working directory to packages root, for setup command.
createfile until end
@ECHO OFF
cd "{parameter “baseFolder”}"
rem // See comments at the beginning of this action for an explanation of the comment markers.
echo %DATE% %TIME% >> "{parameter “logFolder”}{parameter “logFile”}"
echo Action ID: {id of active action} >> "{parameter “logFolder”}{parameter “logFile”}"
rem //**Begin Command Marker
echo Command: “Firefox Installer (1).exe” /s >> "{parameter “logFolder”}{parameter “logFile”}"
set errorlevel=
“Firefox Installer (1).exe” /s >> “{parameter “logFolder”}{parameter “logFile”}” 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker

echo Return code: %SWDExitCode% >> "{parameter “logFolder”}{parameter “logFile”}"
echo. >> "{parameter “logFolder”}{parameter “logFile”}"
exit %SWDExitCode%
end

move __createfile run.bat
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace ‘override wait’ with ‘override run’ and ‘wait’ with ‘run’.
override wait
hidden=true
completion=job
wait run.bat

//**Begin Closing Marker
// Get the return code of the previous action.
parameter “returnCode” = “{exit code of action}”

// Task will now exit.
exit {parameter “returnCode”}
//**End Closing Marker

Success Criteria
This action will be considered successful when it runs to completion.

Please read the manual - https://firefox-source-docs.mozilla.org/browser/installer/windows/installer/FullConfig.html

For silent installation , use /S and not /s

Please keep us posted

I would not do this - you get a file in __Download that the download didn’t put there
I suspect that the action can’t complete because there is an unexpected file in __Download

I think that’s an artifact from the Software Distribution Wizard - ‘basefolder’ would be a user-accessible folder for a per-user install, or the default __Downloads folder for a per-machine installation.

So Reran with /S instead of /s. Job says it completed with a status 1, but never installs firefox. Here is the current Script:
Action Script
Script Type BigFix Action Script

// ---------------------------------------------EDITING INSTRUCTIONS---------------------------------------------------------------------
// When editing this task through the Manage Software Distribution Packages dashboard, you will have the option to preserve any custom edits you make to this action.
// If you select the option to preserve custom edits, only areas bound by the comment markers ‘Preparation Marker’, ‘Command Marker’ and ‘Closing Marker’ are updated.
// To ensure that all your custom Action Script changes can be preserved, only make changes to areas that are not bound by the comment markers.
// Removing the comment markers may result in the Action Script not updating correctly during the next edit.
// See KB Article swg21668807 (https://hclpnpsupport.service-now.com/csm?id=kb_article&sysparm_article=KB0023414) for more information.
// --------------------------------------------------------------------------------------------------------------------------------------

//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=4b8ebb4c79e10395c998638c2f7bb0a10e525c44 sha1=4b8ebb4c79e10395c998638c2f7bb0a10e525c44 size=350400 url=SWDProtocol://127.0.0.1:52311/Uploads/4b8ebb4c79e10395c998638c2f7bb0a10e525c44/Firefox%20Installer%20(1).exe.bfswd sha256=86391f0cb78f6b8eca7635ba2dbff35783ba5a75668164417b86c2b56bc605d2
end prefetch block

// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter “baseFolder” = “__Download/”
// Move files into subfolders and unescape file names
move “__Download/4b8ebb4c79e10395c998638c2f7bb0a10e525c44” “{parameter “baseFolder”}Firefox Installer (1).exe”

// Log setup
parameter “mainSWDLogFolder” = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter “mainSWDLogFolder”}"
parameter “logFile” = “SWD_DeploymentResults.log”

//**End Preparation Marker
delete __createfile
parameter “logFolder” = “{parameter “mainSWDLogFolder”}”
// Run setup process
delete run.bat

// Use .bat to set working directory to packages root, for setup command.
createfile until end
@ECHO OFF
cd "{parameter “baseFolder”}"
rem // See comments at the beginning of this action for an explanation of the comment markers.
echo %DATE% %TIME% >> "{parameter “logFolder”}{parameter “logFile”}"
echo Action ID: {id of active action} >> "{parameter “logFolder”}{parameter “logFile”}"
rem //**Begin Command Marker
echo Command: “Firefox Installer (1).exe” /S >> "{parameter “logFolder”}{parameter “logFile”}"
set errorlevel=
“Firefox Installer (1).exe” /S >> “{parameter “logFolder”}{parameter “logFile”}” 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker

echo Return code: %SWDExitCode% >> "{parameter “logFolder”}{parameter “logFile”}"
echo. >> "{parameter “logFolder”}{parameter “logFile”}"
exit %SWDExitCode%
end

move __createfile run.bat
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace ‘override wait’ with ‘override run’ and ‘wait’ with ‘run’.
override wait
hidden=true
completion=job
wait run.bat

//**Begin Closing Marker
// Get the return code of the previous action.
parameter “returnCode” = “{exit code of action}”

// Task will now exit.
exit {parameter “returnCode”}
//**End Closing Marker

Success Criteria
This action will be considered successful when it runs to completion.

It occurs to me the CMD shell may have issues with the parentheses in Firefox Installer (1).exe, and perhaps you should reupload the file to remove the parentheses

I got it to work…downloaded the Firefox MSI and ran the following script:
Action1
Script Type BigFix Action Script

// ---------------------------------------------EDITING INSTRUCTIONS---------------------------------------------------------------------
// When editing this task through the Manage Software Distribution Packages dashboard, you will have the option to preserve any custom edits you make to this action.
// If you select the option to preserve custom edits, only areas bound by the comment markers ‘Preparation Marker’, ‘Command Marker’ and ‘Closing Marker’ are updated.
// To ensure that all your custom Action Script changes can be preserved, only make changes to areas that are not bound by the comment markers.
// Removing the comment markers may result in the Action Script not updating correctly during the next edit.
// See KB Article swg21668807 (https://hclpnpsupport.service-now.com/csm?id=kb_article&sysparm_article=KB0023414) for more information.
// --------------------------------------------------------------------------------------------------------------------------------------

//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=656e49348c6c21236fc74326f03c427dd23914c8 sha1=656e49348c6c21236fc74326f03c427dd23914c8 size=56627200 url=SWDProtocol://127.0.0.1:52311/Uploads/656e49348c6c21236fc74326f03c427dd23914c8/Firefox%20Setup%20104.0.2.msi.bfswd sha256=3e85870fbbfb07d01a0b647b165c190b9791807ccb84aacd4d67b49728b98c9d
end prefetch block

// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter “baseFolder” = “__Download/”
// Move files into subfolders and unescape file names
move “__Download/656e49348c6c21236fc74326f03c427dd23914c8” “{parameter “baseFolder”}Firefox Setup 104.0.2.msi”

// Log setup
parameter “mainSWDLogFolder” = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter “mainSWDLogFolder”}"
parameter “logFile” = “SWD_DeploymentResults.log”

//**End Preparation Marker
delete __createfile
parameter “logFolder” = “{parameter “mainSWDLogFolder”}”
// Run setup process
delete run.bat

// Use .bat to set working directory to packages root, for setup command.
createfile until end
@ECHO OFF
cd "{parameter “baseFolder”}"
rem // See comments at the beginning of this action for an explanation of the comment markers.
echo %DATE% %TIME% >> "{parameter “logFolder”}{parameter “logFile”}"
echo Action ID: {id of active action} >> "{parameter “logFolder”}{parameter “logFile”}"
rem //**Begin Command Marker
echo Command: msiexec.exe /i “Firefox Setup 104.0.2.msi” /qn >> "{parameter “logFolder”}{parameter “logFile”}"
set errorlevel=
msiexec.exe /i “Firefox Setup 104.0.2.msi” /qn >> “{parameter “logFolder”}{parameter “logFile”}” 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker

echo Return code: %SWDExitCode% >> "{parameter “logFolder”}{parameter “logFile”}"
echo. >> "{parameter “logFolder”}{parameter “logFile”}"
exit %SWDExitCode%
end

move __createfile run.bat
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace ‘override wait’ with ‘override run’ and ‘wait’ with ‘run’.
override wait
hidden=true
completion=job
wait run.bat

//**Begin Closing Marker
// Get the return code of the previous action.
parameter “returnCode” = “{exit code of action}”

// Task will now exit.
exit {parameter “returnCode”}
//**End Closing Marker

Success Criteria
This action will be considered successful when all lines of the action script have completed successfully.

1 Like