I am helping administer systems for a small business that (unfortunately) uses QuickBooks 14 to manage its accounting.
As an aside, is it just me or is QuickBooks one of the most poorly-programmed popular client-server applications in existence? Isn't Intuit making enough money that they could actually write a real client-server app instead of having the users access the storage directly via SMB?
The users use RDP Server running on Win2k8R2 to access the company file, which lives on a separate server dedicated to hosting files.
I have set up the scheduled backup feature in QuickBooks to schedule nightly backups.
Unfortunately, the backups will ocassionally fail - but the error messages provide virtually nothing in the way of helpful info - and I am fairly certain there are no network/NTFS permissions/sharing permissions issues preventing the backup as if there were, the backup would fail every time.
I am superstitious and believe that the backups would work every time if all users were logged out. I have never seen the backup fail when users are logged out.
The problem is I only know how to taskkill
to log the users out programatically; I know there is a button in the program to do that but I need it to run as a scheduled task right before the backup takes place. I don't want to use taskkill
every night as I feel this could lead to data issues.
How can I programatically and gracefully end all users' sessions in QuickBooks?
Late to the game on this, but the solution that we found a while back was to use a scheduled task that kills the Quickbooks process. Although "kill" sounds strong, it appears to gracefully close the application.
For our implementation, we use Group Policy to apply this scheduled task to all of our Quickbooks users.
And we run it as the locally logged in user; because it is in the user-context, I think it will do what you want without disturbing the user's login to RDP. We actually schedule two tasks, one for earlier in the evening, but that doesn't trigger if a a user is actively working on the machine, and does not use the /f argument.
And, I agree with your aside; Quickbooks is by far the most problematic software that I am asked to support. The fact that is supports multi-user environments seems to be an afterthought.
I'm fairly certain that in order to run a backup, QB has to put itself into single user mode. If other users are logged in to QB then it can't do that.
One thing you might consider is to use RDP's Idle and Disconnected session limits to kill the user sessions that have been idle or disconnected for a period of time. That way if a user leaves a session running when they go home for the day the session will be killed after a period of time. That will terminate any QB instances on the server which should allow QB to perform the backup.
If you are an administrator, open your messenger (chat). In the upper right select "Actions" then select"close company file for other users". It will give a list of user who are logged in. You may select as many as needed. (all if you need to switch to single user mode.
I often have remote users forget to log out when they exit the remote connection. Finding this tool has prevented a great deal of frustration.