Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2021, 04:03 PM   #1261
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: 35,417
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by dieselnutjob View Post
The second line of the .bat script says
set KINDLE=%LocalAppData%\Amazon\Kindle

what I actually have is c:\Users\myname\AppData\Local\Amazon\Kindle

if I go to a command prompt and type
C:\>cd %LocalAppData%

I go to

C:\Users\myname\AppData\Local>

the third line of the script is
if not exist "%KINDLE%\application\Kindle.exe" goto :nokindle

so that means %LocalAppData%\Amazon\Kindle\applications\Kindle.e xe

which on my system is C:\Users\myname\AppData\Local\Amazon\Kindle\applic ations\Kindle.exe

I don't have an applications folder in there.

My Kindle.exe is at
C:\Program Files (x86)\Amazon\Kindle\Kindle.exe
That script assumes that you have installed Kindle4PC in it's default location. The %LocalAppData% variable is a Windows environment variable pointing to X:\Users\username\AppData\Local where X is the drive letter and username is the local user name. See the Complete list of environment variables on Windows 10 for a list of these variables.

Since you did not install Kindle4PC in it's default location, the script is unable to find it. You could try defining the Kindle variable as C:\Program Files (x86)\Amazon\Kindle and changing any references to remove the \application from the string. I don't have a Kindle4PC install in a non-standard directory so the storage and updates directories may be in different locations for you. If so, change the locations to match in the batch file. I went on the assumption that the data storage would be in the same location. Sample below for your kindle.exe install location.

Edit: the line reading "if exist "%KINDLE%\storage" if not exist "%KINDLE%\storage\" del /Q "%KINDLE%\storage" " doesn't really make sense but I didn't bother changing it.

Code:
@echo off
set KINDLE=%LocalAppData%\Amazon\Kindle
set KINDLE_EXE=%PROGRAMFILES(X86)%\Amazon\Kindle
if exist "%KINDLE_EXE%\Kindle.exe" goto :found
if not exist "%KINDLE%\application\Kindle.exe" goto :nokindle
:found
rem still not sure what the following line is for
if exist "%KINDLE%\storage" if not exist "%KINDLE%\storage\" del /Q "%KINDLE%\storage"
if exist "%KINDLE%\updates" rmdir /S /Q "%KINDLE%\updates"
echo This file disables Kindle for PC downloads. > "%KINDLE%\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; 06-09-2021 at 01:26 AM. Reason: Added comment on if exist/if not exist line. Modified batch file tol work with default and program files install locations.
DNSB is online now   Reply With Quote
Old 06-09-2021, 06:33 AM   #1262
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
%appdata% resolves as the current user so your system is taking you to the correct place.

%appdata% is where CONFIGURATIONS are stored. The 3 sections are how far they extend out in enterprises. eg Local depends on specific resources for a particular machine.

settings done in program files was a security hole that got patched up a long time ago. Now you need to have special permissions (UAC) to make changes.
theducks is offline   Reply With Quote
Advert
Old 06-09-2021, 09:46 AM   #1263
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by DNSB View Post
Since you did not install Kindle4PC in it's default location, the script is unable to find it. You could try defining the Kindle variable as C:\Program Files (x86)\Amazon\Kindle and changing any references to remove the \application from the string. I don't have a Kindle4PC install in a non-standard directory so the storage and updates directories may be in different locations for you. If so, change the locations to match in the batch file. I went on the assumption that the data storage would be in the same location. Sample below for your kindle.exe install location.
I have updated "disable k4pc download.bat" in the first post of this thread with your changes.

Hopefully someone will try it and report back on whether or not it is effective at blocking updates when Kindle for PC is installed in the alternate location.

Quote:
Originally Posted by DNSB View Post
Edit: the line reading "if exist "%KINDLE%\storage" if not exist "%KINDLE%\storage\" del /Q "%KINDLE%\storage" " doesn't really make sense but I didn't bother changing it.
That line exists to fix the damage done by a bug in the original version of the script which was available for a short time. That bad version replaced the wrong folder, leaving Kindle for PC non-functional. Anyone who ran that bad script can run a newer version to correct the problem.
jhowell is offline   Reply With Quote
Old 06-09-2021, 11:56 AM   #1264
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: 35,417
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by jhowell View Post
I have updated "disable k4pc download.bat" in the first post of this thread with your changes.

Hopefully someone will try it and report back on whether or not it is effective at blocking updates when Kindle for PC is installed in the alternate location.
Hopefully, we should hear back.



Quote:
Originally Posted by jhowell View Post
That line exists to fix the damage done by a bug in the original version of the script which was available for a short time. That bad version replaced the wrong folder, leaving Kindle for PC non-functional. Anyone who ran that bad script can run a newer version to correct the problem.
I must have missed that issue. Thanks for the information.
DNSB is online now   Reply With Quote
Old 06-10-2021, 03:02 PM   #1265
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: 35,417
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
After a PMmed request, I made the same modification to the batch file to start Kindle4PC while blocking KFX downloads that was made to the block updates batch file so the Kindle4PC executable will be started from either the normal or the admin install default locations.

Spoiler:
Code:
rem delete the registy key controlling KFX downloads

reg delete "HKEY_CURRENT_USER\SOFTWARE\Amazon\Kindle\User Settings" /v "isKRFDRendererSupported" /f

rem start K4PC from the default location or admin install location.  This can be modified for non-standard installs
rem the "" sets the title for the DOS box.  This was needed when the location for the segment
rem that starts K4PC had a user name with an embedded space requiring the "...." wrapper

set KINDLE=%LocalAppData%\Amazon\Kindle
set KINDLE_EXE=%PROGRAMFILES(X86)%\Amazon\Kindle

cd "%KINDLE%"

if not exist "%KINDLE_EXE%\Kindle.exe" goto :next
start "" "%KINDLE_EXE%\kindle.exe"
goto :repeat

:next
if not exist "%KINDLE%\application\Kindle.exe" goto :error
start "" "%KINDLE%\application\kindle.exe"

rem this loop waits for the isKRFDRendererSupported key to be created
:repeat
timeout 1
reg query "HKEY_CURRENT_USER\SOFTWARE\Amazon\Kindle\User Settings" /v "isKRFDRendererSupported"
if ERRORLEVEL 1 goto :repeat

rem when we arrive here, the key has been created, replace it with a version that does not allow KFX downloads
reg add "HKEY_CURRENT_USER\SOFTWARE\Amazon\Kindle\User Settings" /v "isKRFDRendererSupported" /t REG_SZ /d "false" /f
goto :ender

:error
echo Could not start Kindle4PC from either location tried.

:ender
rem  wait for any key to be hit to close the command windows.  remove the pause statement to auto-close
pause
Attached Files
File Type: bat kindle_noKFX.bat (1.4 KB, 3627 views)

Last edited by DNSB; 06-10-2021 at 03:07 PM.
DNSB is online now   Reply With Quote
Advert
Old 06-11-2021, 01:54 AM   #1266
Manolis
Junior Member
Manolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipse
 
Posts: 8
Karma: 8234
Join Date: Jul 2017
Device: Kindle
Just for the record, in order to cope with very occasional unstoppable updates on my Mac, I made a zipped copy of Kindle.app and left it in the Applications folder. When Kindle.app gets updated, I simply delete it then unzip a copy of the old version.
Manolis is offline   Reply With Quote
Old 06-11-2021, 05:00 AM   #1267
lkmiller
Laura
lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.
 
lkmiller's Avatar
 
Posts: 1,300
Karma: 22770070
Join Date: Nov 2009
Device: Kobo Sage, Kobo Elipsa, Nook Glowlight Plus 7.8", Kindle Oasis 2
Are you still getting updates with your updates folder set to read only or with a blank no extension txt file named updates?
lkmiller is offline   Reply With Quote
Old 06-18-2021, 01:19 AM   #1268
Manolis
Junior Member
Manolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipseManolis can illuminate an eclipse
 
Posts: 8
Karma: 8234
Join Date: Jul 2017
Device: Kindle
I haven't messed with any settings. I ignore the update nagging but now and again the damn thing downloads and installs anyway! I was running El Capitan but just switched to High Sierra, so we'll see what happens. I note that the nagging "1" is still on the App Store icon in the dock.
Manolis is offline   Reply With Quote
Old 06-19-2021, 08:03 AM   #1269
lkmiller
Laura
lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.
 
lkmiller's Avatar
 
Posts: 1,300
Karma: 22770070
Join Date: Nov 2009
Device: Kobo Sage, Kobo Elipsa, Nook Glowlight Plus 7.8", Kindle Oasis 2
See this post about blocking updates.
lkmiller is offline   Reply With Quote
Old 06-26-2021, 02:12 AM   #1270
scarlettmonty
Junior Member
scarlettmonty began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2021
Device: Pixel 4a and Kindle for PC
Preventing Undesired App Updates

Thanks so much for your fantastic, clear instructions for getting around this KFX issue. I successfully followed all your steps, and was able to convert a couple of books to PDF format. However, when I closed and then restarted Kindle for PC later, it had updated itself, just as you said it would:

"The Kindle app can be aggressive about updating itself to the latest version. Even after the option to automatically install updates is deselected the software sometimes will update itself unexpectedly."

So I'm now ready to follow your last instruction:

"One method to block automatic updates under Windows is to locate the "updates" folder within your Kindle for PC installation and replace it with a file of the same name. The attached batch file ("disable k4pc download.bat") will perform that process automatically as long as Kindle for PC has been installed for single user use. After running this file Kindle for PC will still try to download the new update each time it is restarted, but it will be unable to do so."

I've downloaded the .bat file, but before I do anything with it, just want to check what exactly I need to do. After uninstalling the updated version, deregistering, deleting downloaded books, re-installing version 1.17, and deselecting the automatic updates option (again), I looked for and found the "updates" folder, and it has a Kindle for PC installer .exe file in it. Should I delete that .exe file? (I have the 1.17 installer saved in a different location.) And do I delete the updates folder and replace it with the .bat file, or just put the .bat file into the updates folder?

Just want to be sure I get this right, so I don't need to start the whole process again.

Cheers
scarlettmonty is offline   Reply With Quote
Old 06-26-2021, 06:31 AM   #1271
lkmiller
Laura
lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.lkmiller ought to be getting tired of karma fortunes by now.
 
lkmiller's Avatar
 
Posts: 1,300
Karma: 22770070
Join Date: Nov 2009
Device: Kobo Sage, Kobo Elipsa, Nook Glowlight Plus 7.8", Kindle Oasis 2
You run the .bat file and it replaces the updates folder for you.
lkmiller is offline   Reply With Quote
Old 06-26-2021, 07:02 AM   #1272
drjd
The Couch Potato
drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.
 
drjd's Avatar
 
Posts: 34,509
Karma: 230999999
Join Date: Aug 2015
Device: Kobo Glo, Kobo Touch, Archos 9, Onyx Boox C67ML Carta
I successfully installed kindle-for-pc-1-17-44170 and blocked the automatic updates with the given batch file. After re-registering I downloaded a few books, but I got a system message that I need to update the Kindle for a particular book. I've paused further downloads for now.

Any guess why?
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2021-06-26 155625.jpg
Views:	276
Size:	90.5 KB
ID:	187876  
drjd is offline   Reply With Quote
Old 06-26-2021, 07:47 AM   #1273
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,506
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by drjd View Post
I successfully installed kindle-for-pc-1-17-44170 and blocked the automatic updates with the given batch file. After re-registering I downloaded a few books, but I got a system message that I need to update the Kindle for a particular book. I've paused further downloads for now.

Any guess why?
Some books are only available in KFX format.
pdurrant is offline   Reply With Quote
Old 06-26-2021, 09:27 AM   #1274
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by pdurrant View Post
Some books are only available in KFX format.
That particular book appears to be in Hindi. That is one of the categories of books that are only available from Amazon in KFX format.

Last edited by jhowell; 06-26-2021 at 09:31 AM.
jhowell is offline   Reply With Quote
Old 06-27-2021, 05:25 AM   #1275
drjd
The Couch Potato
drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.drjd ought to be getting tired of karma fortunes by now.
 
drjd's Avatar
 
Posts: 34,509
Karma: 230999999
Join Date: Aug 2015
Device: Kobo Glo, Kobo Touch, Archos 9, Onyx Boox C67ML Carta
Noted. Thanks.
drjd is offline   Reply With Quote
Reply

Tags
k4pc, kindle for pc


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling KFX files in Calibre HarryT Conversion 53 08-31-2018 03:21 AM
Dealing with Kindle for PC/Mac 1.19 and KFX in calibre BetterRed Conversion 0 02-08-2017 12:47 PM
Dealing with Kindle for PC/Mac 1.19 and KFX in calibre BetterRed Devices 0 02-06-2017 06:59 PM
updated calibre with a little help for kfx format cvkemp Amazon Kindle 0 10-06-2015 10:08 AM
Dealing with Multiple Calibre libraries samoanbiscuit Calibre Companion 4 08-27-2014 09:35 AM


All times are GMT -4. The time now is 10:16 PM.


MobileRead.com is a privately owned, operated and funded community.