08-08-2012, 05:41 PM | #1 |
Junior Member
Posts: 8
Karma: 60
Join Date: Aug 2012
Device: Kobo Touch and Nexus 7
|
Auto-update Calibre: How-to using PowerShell
PLEASE NOTE THAT THIS SET OF INSTRUCTIONS INVOLVES DISABLING THE SCRIPT EXECUTION PREVENTION, WHICH CAN SERIOUSLY OPEN YOUR SYSTEM TO EXPLOITS! USE AT YOUR OWN RISK!
As far as I know this script will work on any computer that has PowerShell installed (Windows Only) Step 1) Create the script by opening Notepad (NOT MS WORD) and pasting in the following code: Code:
$storagedir = $env:temp $webclient = New-Object System.Net.WebClient $url = "http://status.calibre-ebook.com/dist/win32" $file = "$storagedir\CalibreInstaller.msi" $webclient.DownloadFile($url,$file) msiexec /q /i $file /norestart Step 2) Save this file as a .ps1 file (Make sure to select the "All Files" type in the Save As box and add the .ps1 suffix manually). Make sure to save it somewhere that is easy to remember. I used C:\Scripts and called it CalibreUpdater. Step 3) Open the PowerShell (In the Start Menu under Accessories) and type in Code:
Set-ExecutionPolicy Unrestricted OK That's the scary bits over with. Here's where you get to set the schedule for it. Since Calibre updates on Fridays, I have set mine to run on Saturdays. This gives me a chance to disable the update if I don't want the newest version yet. Step 4) Open the Task Scheduler (Found in the Control Panel under the System & Security and then Administrative Tools) and create a new Task. The trigger is when we can set the schedule. You can set whatever options you want here on the schedule. Do that now. I would also recommend allowing the task to run even if you are not logged in (especially if you are setting it for an overnight update). Step 5) Select the Actions tab. Where it says to Run a Program or Script, you can paste in the following path for PowerShell: Code:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe Code:
C:\Scripts\CalibreUpdater.ps1 NOTE: If you have the User Account Control enabled on your machine, you will need to allow this Scheduled task to run with the administrator rights (General tab). I hope that helps people looking for a way to setup the auto-update. It's kind of convoluted, and I tried to explain as best I could, but please do take care with these instructions. Disabling the script execution prevention can open you up to exploits and other dangers. Please ensure you have an up-to-date anti-virus and are careful in your browsing before enabling scripts to run. I will try to be online for the next hour or so, if anyone has any questions. |
Tags |
auto, calibre, powershell, update |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Auto-update function | Logseman | Calibre | 37 | 07-29-2013 03:48 PM |
Auto-update | kapsi | Calibre | 6 | 07-24-2011 12:24 PM |
Disabling Auto Update Question | jenniren | Nook Developer's Corner | 12 | 02-02-2011 03:25 AM |
Auto update | Toxaris | Sigil | 1 | 11-17-2010 05:36 AM |
Auto Update to Connect | Xsavior | Sony Reader | 0 | 10-18-2007 03:07 PM |