CYBER MONDAY SALE 70% OFF QuickBooks for 3 months*   Ends 12/5

Buy now
cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 
Announcements
Simplify payday and set payroll to run automatically on QuickBooks. Explore QuickBooks Payroll

Reply to message

View discussion in a popup

Replying to:
plutothegoldrush
Level 1

Reply to message

I am not TJames95 nor have I seen that Powershell Script. A lot of assumptions have been in this, please use at your own risk. However, this should work for most versions of QB provided the ProgramData path is correct. This script would need to be copied/pasted saved as a .ps1 file and then set to run on a schedule with Task Scheduler in Windows, very easy to google how to do that.

 

ForEach ($file in (Get-ChildItem -Path C:\ProgramData\Intuit\QuickBooks*\Components\QBUpdate\Qbchan.dat))
{
$filecontent = Get-Content -Path "$file"
$filecontent[3] = $filecontent[3] -replace 'BackgroundEnabled=1','BackgroundEnabled=0'
Set-Content -Path $file.PSpath -Value $filecontent
}

 

Essentially for each Qbchan.dat file in the path, modify line 3 (which is line 4 as PS starts counting at 0) from BackgroundEnabled=1 to BackgroundEnabled=0. This should be pretty safe as we are only looking at line 4, and specifically for "BackgroundEnabled=1" if any other value was there the file would not be modified. Powershell is saving the file again so the modified date will change, but the content inside would remain the same.

 

If the above doesn't work you can clearly modify the script to point to specific folder path/s of your choosing. Something like this would be more basic:

 

$file="C:\your\file\path\here"
$filecontent = Get-Content -Path $file
$filecontent[3] = $filecontent[3] -replace 'BackgroundEnabled=1','BackgroundEnabled=0'
Set-Content -Path $file -Value $filecontent

Need to get in touch?

Contact us