View Single Post
Old 02-19-2021, 10:21 AM   #1131
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,030
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
@whitearrow: You mention that the updates file is downloaded to \AppData\Local\Amazon\Kindle which would suggest that instead of placing the blocking file in Program Files (x86)\Amazon\Kindle, it should be placed in \AppData\Local\Amazon\Kindle.

Code:
@echo off
rem for standard install in AppData, use %localappdata%\Amazon\Kindle\application%
set KindleApp=Program Files (x86)\Amazon\Kindle
set KindleStorage=%localappdata%\Amazon\Kindle

if not exist "%KindleApp%\kindle.exe" goto :nokindle
if exist "%KindleStorage%\storage" if not exist "%KindleStorage%\storage\" del /Q "%KindleStorage%\storage"
if exist "%KindleStorage%\updates" rmdir /S /Q "%KindleStorage%\updates"
echo This file disables Kindle for PC downloads. > "%KindleStorage%\updates"
echo Kindle for PC downloads are now disabled
goto :exit
:nokindle
echo Cannot disable downloads - Kindle for PC is not installed at expected location
:exit
pause

Last edited by DNSB; 02-19-2021 at 10:36 AM. Reason: added modified batch file
DNSB is offline