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 nowPlease DO NOT send me instruction on how to exit an attended session of Quickbooks. This is all unattended.
A customer of mine is having trouble remembering to exit Quickbooks Desktop at the end of the day so that his backup programs will back it up. (QB does not support VSS.).
He asked me if I could implement some "soft exit" to his backup program to soft exit Quickbooks if it is still running. How do I do such. I know how to hard exit it, but I am concerned about corruptions and data loss.
Solved! Go to Solution.
Here is chatgpt's take on the question I actually asked:
ChatGPT:
Quickbooks Desktop: is the a safe way to shut down Quickbook from the command line?
Yes—there is a reasonably safe way to close QuickBooks Desktop from the command line, but you need to be careful about how you do it.
The short answer
QuickBooks Desktop does not provide an official command-line “shutdown” command. So any approach is essentially telling Windows to close the process, which can risk data loss if something is mid-operation.
Safer approaches (best to worst)
1. Graceful close via script (recommended)
You can try sending a close signal instead of killing the process:
taskkill /IM QBW32.EXE
• This sends a normal close request (similar to clicking the “X”).
• If QuickBooks is idle, it usually shuts down cleanly.
• If there are unsaved transactions or dialogs open, it may prompt (but you won’t see that prompt in CLI-only contexts).
2. Force kill (NOT recommended unless necessary)
taskkill /F /IM QBW32.EXE
• /F = force terminate immediately
• This can corrupt company files if:
◦ A transaction is being saved
◦ A rebuild/verify is running
◦ Multi-user mode is active
Only use this if QuickBooks is frozen and you have no alternative.
3. Better automation option (most reliable)
If you need consistency (like in a scheduled task), consider:
• Using a small script (PowerShell or VBScript) that:
◦ Activates the QuickBooks window
◦ Sends a normal close message
• Or ensuring QuickBooks is idle before running taskkill
Example PowerShell approach:
Stop-Process -Name QBW32 -ErrorAction SilentlyContinue
(This behaves similarly to the non-forced taskkill.)
Important precautions
• Always ensure:
◦ No users are logged in (multi-user mode especially)
◦ No background tasks (backups, rebuilds)
• If this is on a server:
◦ Coordinate with users or schedule after hours
• Consider enabling auto-backup in QuickBooks as a safety net
Bottom line
There’s no officially supported “safe shutdown” CLI for QuickBooks Desktop. The least risky method is:
Anything more aggressive increases the chance of file damage.
Hello ToddAndMargo. Properly closing QuickBooks Desktop (QBDT) is essential for maintaining data integrity, preventing corruption of company files, and minimizing the risk of data loss or irreversible damage to your customer's records.
Please note that QBDT only supports backup files with a .qbb extension. This file contains a compressed copy of your customer's company data, including accounting records, templates, logos, and images.
To exit the program properly, go to the top menu, click on File, and select Close Company. Next, click on File again in the top menu and select Exit.
By following these steps, you can minimize potential risks, such as corrupted data, and maintain the security of your customers' data.
If you have any further concerns about QBDT, please feel free to leave a comment below. The Community is always here to help you out.
What part of "Please DO NOT send me instruction on how to exit an attended session of Quickbooks. This is all unattended." did you not understand? Please endeavor to answer the question that was actually asked.
Oh and "QBDT only supports backup files with a .qbb extension" is not correct. You exit QBDT, make a backup copy of the bad qbw file, and replace it with the qbw file from your backup. I have done it hundreds of times.
I just noticed that the customer's backup program reboot the computer after it finishes. This has been going on for years. HIs qbw has never been corrupted. Am I over thinking this?
Hi there, Todd. Since this has been going for a year now. I suggest reaching out to our QuickBooks Desktop support team. They can pull up the account and check what is the root cause of this one.
You may visit this article and check for the work hours.
If you need anything else, don't hesitate to reply here. We're here to help.
What root cause? QBDT is working fine.
Here is chatgpt's take on the question I actually asked:
ChatGPT:
Quickbooks Desktop: is the a safe way to shut down Quickbook from the command line?
Yes—there is a reasonably safe way to close QuickBooks Desktop from the command line, but you need to be careful about how you do it.
The short answer
QuickBooks Desktop does not provide an official command-line “shutdown” command. So any approach is essentially telling Windows to close the process, which can risk data loss if something is mid-operation.
Safer approaches (best to worst)
1. Graceful close via script (recommended)
You can try sending a close signal instead of killing the process:
taskkill /IM QBW32.EXE
• This sends a normal close request (similar to clicking the “X”).
• If QuickBooks is idle, it usually shuts down cleanly.
• If there are unsaved transactions or dialogs open, it may prompt (but you won’t see that prompt in CLI-only contexts).
2. Force kill (NOT recommended unless necessary)
taskkill /F /IM QBW32.EXE
• /F = force terminate immediately
• This can corrupt company files if:
◦ A transaction is being saved
◦ A rebuild/verify is running
◦ Multi-user mode is active
Only use this if QuickBooks is frozen and you have no alternative.
3. Better automation option (most reliable)
If you need consistency (like in a scheduled task), consider:
• Using a small script (PowerShell or VBScript) that:
◦ Activates the QuickBooks window
◦ Sends a normal close message
• Or ensuring QuickBooks is idle before running taskkill
Example PowerShell approach:
Stop-Process -Name QBW32 -ErrorAction SilentlyContinue
(This behaves similarly to the non-forced taskkill.)
Important precautions
• Always ensure:
◦ No users are logged in (multi-user mode especially)
◦ No background tasks (backups, rebuilds)
• If this is on a server:
◦ Coordinate with users or schedule after hours
• Consider enabling auto-backup in QuickBooks as a safety net
Bottom line
There’s no officially supported “safe shutdown” CLI for QuickBooks Desktop. The least risky method is:
Anything more aggressive increases the chance of file damage.
You have clicked a link to a site outside of the QuickBooks or ProFile Communities. By clicking "Continue", you will leave the community and be taken to that site instead.
For more information visit our Security Center or to report suspicious websites you can contact us here