Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forΒ
Get 50% OFF QuickBooks for 3 months*
Buy nowFor admins who need to disable QBES from accessing the updates download folder on a large number of computers, I wrote these Windows/DOS batch files to do what is in the guide provided by @BigRedConsulting. Double click the batch files or type in their filenames in the command-line to run them. With minor modifications, they can also be run as part of login scripts or through AD if you remove the section with the choice to continue. In most cases, the scripts do not require administrative privileges (only requiring them if the QBES download folder is restricted). The scripts will effectively remove the requirement of forced updates and let users run the QBES app until an admin can get around to applying patches/updates.
The scripts are currently setup for QBES 22.0 but will probably work for past and future versions if you change the value of QB_COMPONENTS_DOWNLOAD_FOLDER to the correct path. So far I have tested them on Windows 10 and Windows Server 2016/2019.
*DISCLAIMER: The scripts comes with ABSOLUTELY NO WARRANTY. Anybody can use them for whatever purpose but do so at their own risk. You are encouraged to read the scripts to understand what they do.
@ECHO OFF
ECHO ==============================================================================
ECHO This script will Disable Downloads for the QuickBooks Desktop Automatic Update
ECHO ==============================================================================
ECHO.
REM *** Set QB_COMPONENTS_DOWNLOAD_FOLDER to the folder where QuickBooks downloads patches for your installed version. ***
SETLOCAL
SET QB_COMPONENTS_DOWNLOAD_FOLDER=C:\ProgramData\Intuit\QuickBooks Enterprise Solutions 22.0\Components\DownloadQB32\
SET CMD_OUTPUT_FILE=%TEMP%\cmdOutput%random%-%random%.txt
IF "%QB_COMPONENTS_DOWNLOAD_FOLDER:~-1,1%"=="\" SET QB_COMPONENTS_DOWNLOAD_FOLDER=%QB_COMPONENTS_DOWNLOAD_FOLDER:~0,-1%
FOR /F "delims=" %%i IN ("%QB_COMPONENTS_DOWNLOAD_FOLDER%") DO @SET FOLDER_BASENAME=%%~nxi
REM *** Checks if the folder exists and exits the script if it doesn't. ***
IF NOT EXIST "%QB_COMPONENTS_DOWNLOAD_FOLDER%" (
ECHO WARNING: "%QB_COMPONENTS_DOWNLOAD_FOLDER%" does not exist. Please double-check you have set this script's QB_COMPONENTS_DOWNLOAD_FOLDER value correctly. This value can be found in the QuickBooks Desktop app under the menu Help ^> Update QuickBooks Desktop... ^> Options tab ^> Download Location. Exiting script.
GOTO Script_Exit
)
REM *** Get next available, unused folder number. ***
SET FOLDER_NUMBER=1
FOR /L %%i IN (1, 1, 1000) DO (
IF NOT EXIST "%QB_COMPONENTS_DOWNLOAD_FOLDER%.%%i" (
SET FOLDER_NUMBER=%%i
goto Exit_Loop
)
)
:Exit_Loop
REM *** Ask the user if they wish to continue disabling access to the download folder. If 'N' is entered then exit the script. ***
ECHO To prevent QuickBooks from downloading updates, the script will perform the following actions:
ECHO.
ECHO [1] Rename the folder "%QB_COMPONENTS_DOWNLOAD_FOLDER%" to "%FOLDER_BASENAME%.%FOLDER_NUMBER%".
ECHO [2] Create a new, empty folder with the original name "%FOLDER_BASENAME%".
ECHO [3] Deny write access for the new folder "%FOLDER_BASENAME%" to group accounts EVERYONE and SYSTEM.
ECHO.
choice /c yn /m "Do you wish to continue"
IF ERRORLEVEL==2 GOTO Script_Exit
REM *** Check if QuickBooks Automatic Update Agent is running and terminate it. ***
tasklist /fi "ImageName eq qbupdate.exe" /fo csv 2>NUL | find /I "qbupdate.exe">NUL
IF %ERRORLEVEL%==0 (
ECHO.
ECHO | SET /p MSG=Detected QuickBooks Automatic Update Agent running. Attempting to terminate...
taskkill /im qbupdate.exe /t /f
tasklist /fi "ImageName eq qbupdate.exe" /fo csv 2>NUL | find /I "qbupdate.exe">NUL
IF NOT %ERRORLEVEL%==0 (
ECHO Please try to manually terminate QuickBooks Automatic Update using the Windows Task Manager. Exiting script.
GOTO Script_Exit
)
)
REM *** Do the work to disable download folder access. ***
REM *** Start by renaming the download folder. ****
ECHO.
ECHO | SET /p MSG=[1] Renaming "%QB_COMPONENTS_DOWNLOAD_FOLDER%" to "%FOLDER_BASENAME%.%FOLDER_NUMBER%"...
ren "%QB_COMPONENTS_DOWNLOAD_FOLDER%" "%FOLDER_BASENAME%.%FOLDER_NUMBER%" > "%CMD_OUTPUT_FILE%" 2>&1
IF %ERRORLEVEL%==0 (
ECHO OK.
) ELSE (
SET /p CMD_OUTPUT1= < "%CMD_OUTPUT_FILE%"
ECHO FAILED: %CMD_OUTPUT1% Exiting script.
ECHO.
ECHO ^*NOTE: Access Denied errors can be caused by write permissions to "%QB_COMPONENTS_DOWNLOAD_FOLDER%" already being set ^(e.g. by a previous execution of this script^).
GOTO Script_Exit
)
REM *** Create a new, empty folder. ****
ECHO | SET /p MSG=[2] Creating new, empty folder "%FOLDER_BASENAME%"...
mkdir "%QB_COMPONENTS_DOWNLOAD_FOLDER%" > "%CMD_OUTPUT_FILE%" 2>&1
IF %ERRORLEVEL%==0 (
ECHO OK.
) ELSE (
SET /p CMD_OUTPUT2= < "%CMD_OUTPUT_FILE%"
ECHO FAILED: %CMD_OUTPUT2% Exiting script.
GOTO Script_Exit
)
REM *** Deny write permission of the new folder to group EVERYONE. ****
ECHO | SET /p MSG=[3a] Denying group EVERYONE write access to folder "%FOLDER_BASENAME%"...
icacls "%QB_COMPONENTS_DOWNLOAD_FOLDER%" /Q /deny Everyone:W > "%CMD_OUTPUT_FILE%" 2>&1
IF %ERRORLEVEL%==0 (
ECHO OK.
) ELSE (
SET /p CMD_OUTPUT3= < "%CMD_OUTPUT_FILE%"
ECHO FAILED: %CMD_OUTPUT3% Exiting script.
GOTO Script_Exit
)
REM *** Deny write permission of the new folder to group SYSTEM. ****
ECHO | SET /p MSG=[3b] Denying group SYSTEM write access to folder "%FOLDER_BASENAME%"...
icacls "%QB_COMPONENTS_DOWNLOAD_FOLDER%" /Q /deny System:W > "%CMD_OUTPUT_FILE%" 2>&1
IF %ERRORLEVEL%==0 (
ECHO OK.
) ELSE (
SET /p CMD_OUTPUT4= < "%CMD_OUTPUT_FILE%"
ECHO FAILED: %CMD_OUTPUT4% Exiting script.
GOTO Script_Exit
)
ECHO.
ECHO All Done.
:Script_Exit
REM *** Delete the temporary command output file. ***
IF EXIST "%CMD_OUTPUT_FILE%" del "%CMD_OUTPUT_FILE%"
ENDLOCAL
timeout 10@ECHO OFF
ECHO ======================================================================
ECHO This script will UNDO the changes made by the Disable Downloads script
ECHO ======================================================================
ECHO.
REM *** Set QB_COMPONENTS_DOWNLOAD_FOLDER to the folder where QuickBooks downloads patches for your installed version. ***
SETLOCAL
SET QB_COMPONENTS_DOWNLOAD_FOLDER=C:\ProgramData\Intuit\QuickBooks Enterprise Solutions 22.0\Components\DownloadQB32\
SET CMD_OUTPUT_FILE=%TEMP%\cmdOutput%random%-%random%.txt
IF "%QB_COMPONENTS_DOWNLOAD_FOLDER:~-1,1%"=="\" SET QB_COMPONENTS_DOWNLOAD_FOLDER=%QB_COMPONENTS_DOWNLOAD_FOLDER:~0,-1%
FOR /F "delims=" %%i IN ("%QB_COMPONENTS_DOWNLOAD_FOLDER%") DO @SET FOLDER_BASENAME=%%~nxi
REM *** Checks if the download folder exists. If it doesn't, ask if it should be recreated or exit the script. ***
IF NOT EXIST "%QB_COMPONENTS_DOWNLOAD_FOLDER%" (
ECHO WARNING: "%QB_COMPONENTS_DOWNLOAD_FOLDER%" does not exist. Please double-check you have set the script's QB_COMPONENTS_DOWNLOAD_FOLDER value correctly. This value can be found in the QuickBooks Desktop app under the mennu Help ^> Update QuickBooks Desktop... ^> Options tab ^> Download Location.
ECHO.
choice /c yn /m "Would you like to have folder '%FOLDER_BASENAME%' recreated"
IF ERRORLEVEL==2 GOTO Script_Exit
ECHO.
ECHO | SET /p MSG=Creating new, empty folder "%FOLDER_BASENAME%"...
mkdir "%QB_COMPONENTS_DOWNLOAD_FOLDER%" > "%CMD_OUTPUT_FILE%" 2>&1
IF %ERRORLEVEL%==0 (
ECHO OK.
) ELSE (
SET /p CMD_OUTPUT4= < "%CMD_OUTPUT_FILE%"
ECHO FAILED: %CMD_OUTPUT4% Exiting script.
)
GOTO Script_Exit
)
REM *** Get highest folder number which should be the newest. ***
SET FOLDER_NUMBER=
FOR /L %%i IN (1000, -1, 0) DO (
IF EXIST "%QB_COMPONENTS_DOWNLOAD_FOLDER%.%%i" (
SET FOLDER_NUMBER=%%i
goto Exit_Loop
)
)
:Exit_Loop
IF "%FOLDER_NUMBER%"=="" (
ECHO ERROR: No backup for "%QB_COMPONENTS_DOWNLOAD_FOLDER%" exists. The backup should have been created by the Disable Downloads script. In addition, please double-check you have set this script's QB_COMPONENTS_DOWNLOAD_FOLDER rem value correctly. This value can be found in the QuickBooks Desktop app under the menu Help ^> Update QuickBooks Desktop... ^> Options tab ^> Download Location. Exiting script.
GOTO Script_Exit
)
REM *** Ask the user if they wish to continue enabling access to the download folder. If 'N' is entered then exit the script. ***
ECHO This will allow the QuickBooks Automatic Update Agent to access the download folder again. The following actions will be performed:
ECHO.
ECHO [1] Reset the permissions for folder "%QB_COMPONENTS_DOWNLOAD_FOLDER%" so that it can be deleted.
ECHO [2] Delete the folder "%FOLDER_BASENAME%".
ECHO [3] Rename the backup folder "%FOLDER_BASENAME%.%FOLDER_NUMBER%" to "%FOLDER_BASENAME%".
ECHO.
choice /c yn /m "Do you wish to continue"
IF ERRORLEVEL==2 GOTO Script_Exit
REM *** Do the work to enable download folder access. ***
REM *** Reset folder permissions for the download folder. ****
ECHO.
ECHO | SET /p MSG=[1] Resetting access permission for folder "%QB_COMPONENTS_DOWNLOAD_FOLDER%"...
icacls "%QB_COMPONENTS_DOWNLOAD_FOLDER%" /reset > "%CMD_OUTPUT_FILE%" 2>&1
IF %ERRORLEVEL%==0 (
ECHO OK.
) ELSE (
SET /p CMD_OUTPUT1= < "%CMD_OUTPUT_FILE%"
ECHO FAILED: %CMD_OUTPUT1% Exiting script.
GOTO Script_Exit
)
REM *** Delete the old download folder. ****
ECHO | SET /p MSG=[2] Deleting folder "%FOLDER_BASENAME%"...
rmdir /s /q "%QB_COMPONENTS_DOWNLOAD_FOLDER%" > "%CMD_OUTPUT_FILE%" 2>&1
IF %ERRORLEVEL%==0 (
ECHO OK.
) ELSE (
SET /p CMD_OUTPUT2= < "%CMD_OUTPUT_FILE%"
ECHO FAILED: %CMD_OUTPUT2% Exiting script.
GOTO Script_Exit
)
REM *** Rename the backup of the download folder. ****
ECHO | SET /p MSG=[3] Renaming "%FOLDER_BASENAME%.%FOLDER_NUMBER%" to "%FOLDER_BASENAME%"...
ren "%QB_COMPONENTS_DOWNLOAD_FOLDER%.%FOLDER_NUMBER%" "%FOLDER_BASENAME%" > "%CMD_OUTPUT_FILE%" 2>&1
IF %ERRORLEVEL%==0 (
ECHO OK.
) ELSE (
SET /p CMD_OUTPUT3= < "%CMD_OUTPUT_FILE%"
ECHO FAILED: %CMD_OUTPUT3% Exiting script.
GOTO Script_Exit
)
ECHO.
ECHO All Done.
:Script_Exit
REM *** Delete the temporary command output file. ***
IF EXIST "%CMD_OUTPUT_FILE%" del "%CMD_OUTPUT_FILE%"
ENDLOCAL
timeout 10