2015-08-19 18:55:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# autoUpdater
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-22 11:42:54 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								>  Enable apps to automatically update themselves.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-21 15:35:29 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-23 11:20:56 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Process: [Main ](../glossary.md#main-process )
							 
						 
					
						
							
								
									
										
										
										
											2016-11-03 10:26:00 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-03-10 09:04:07 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								**See also: [A detailed guide about how to implement updates in your application ](../tutorial/updates.md ).**
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 16:35:03 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-07-22 08:20:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`autoUpdater`  is an [EventEmitter][event-emitter].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-08-12 01:30:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Platform Notices
 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-05 10:07:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-08-12 01:30:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Currently, only macOS and Windows are supported. There is no built-in support
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								for auto-updater on Linux, so it is recommended to use the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								distribution's package manager to update your app.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								In addition, there are some subtle differences on each platform:
							 
						 
					
						
							
								
									
										
										
										
											2014-05-05 10:07:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-18 15:26:26 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### macOS
 
							 
						 
					
						
							
								
									
										
										
										
											2014-07-25 09:14:49 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-18 15:26:26 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								On macOS, the `autoUpdater`  module is built upon [Squirrel.Mac][squirrel-mac],
							 
						 
					
						
							
								
									
										
										
										
											2015-11-03 15:30:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								meaning you don't need any special setup to make it work. For server-side
							 
						 
					
						
							
								
									
										
										
										
											2016-11-10 13:35:56 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								requirements, you can read [Server Support][server-support]. Note that [App
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251 -SW35) (ATS) applies to all requests made as part of the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								update process. Apps that need to disable ATS can add the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`NSAllowsArbitraryLoads`  key to their app's plist.
							 
						 
					
						
							
								
									
										
										
										
											2014-05-05 10:07:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-18 15:26:26 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								**Note:** Your application must be signed for automatic updates on macOS.
							 
						 
					
						
							
								
									
										
										
										
											2016-04-06 17:40:07 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								This is a requirement of `Squirrel.Mac` .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-10-23 20:11:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Windows
 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-05 10:07:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-03 15:30:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								On Windows, you have to install your app into a user's machine before you can
							 
						 
					
						
							
								
									
										
										
										
											2016-05-06 10:05:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								use the `autoUpdater` , so it is recommended that you use the
							 
						 
					
						
							
								
									
										
										
										
											2023-01-02 02:52:18 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[electron-winstaller][installer-lib], [Electron Forge][electron-forge-lib] or the [grunt-electron-installer][installer] package to generate a Windows installer.
							 
						 
					
						
							
								
									
										
										
										
											2015-11-03 15:30:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-02 02:52:18 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								When using [electron-winstaller][installer-lib] or [Electron Forge][electron-forge-lib] make sure you do not try to update your app [the first time it runs ](https://github.com/electron/windows-installer#handling-squirrel-events ) (Also see [this issue for more info ](https://github.com/electron/electron/issues/7155 )). It's also recommended to use [electron-squirrel-startup ](https://github.com/mongodb-js/electron-squirrel-startup ) to get desktop shortcuts for your app.
							 
						 
					
						
							
								
									
										
										
										
											2016-09-09 13:51:42 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-03 15:30:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								The installer generated with Squirrel will create a shortcut icon with an
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[Application User Model ID][app-user-model-id] in the format of
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`com.squirrel.PACKAGE_ID.YOUR_EXE_WITHOUT_DOT_EXE` , examples are
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`com.squirrel.slack.Slack`  and `com.squirrel.code.Code` . You have to use the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								same ID for your app with `app.setAppUserModelId`  API, otherwise Windows will
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								not be able to pin your app properly in task bar.
							 
						 
					
						
							
								
									
										
										
										
											2014-05-05 10:07:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-07 17:03:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Like Squirrel.Mac, Windows can host updates on S3 or any other static file host.
							 
						 
					
						
							
								
									
										
										
										
											2017-08-15 11:27:33 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You can read the documents of [Squirrel.Windows][squirrel-windows] to get more details
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								about how Squirrel.Windows works.
							 
						 
					
						
							
								
									
										
										
										
											2017-08-15 11:24:59 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-19 18:55:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Events
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The `autoUpdater`  object emits the following events:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Event: 'error'
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Returns:
							 
						 
					
						
							
								
									
										
										
										
											2015-04-07 09:21:29 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-10-23 14:36:36 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								*  `error`  Error
							 
						 
					
						
							
								
									
										
										
										
											2015-04-07 09:21:29 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-23 17:57:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Emitted when there is an error while updating.
							 
						 
					
						
							
								
									
										
										
										
											2015-04-07 09:21:29 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-19 18:55:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Event: 'checking-for-update'
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-28 16:51:41 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Emitted when checking if an update has started.
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-19 18:55:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Event: 'update-available'
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-02 20:37:46 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-23 17:57:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Emitted when there is an available update. The update is downloaded
							 
						 
					
						
							
								
									
										
										
										
											2014-02-02 20:37:46 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								automatically.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-19 18:55:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Event: 'update-not-available'
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-02 20:37:46 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Emitted when there is no available update.
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-19 18:55:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Event: 'update-downloaded'
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Returns:
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*  `event`  Event
							 
						 
					
						
							
								
									
										
										
										
											2021-11-16 05:13:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								*  `releaseNotes`  string
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*  `releaseName`  string
							 
						 
					
						
							
								
									
										
										
										
											2014-02-02 20:37:46 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								*  `releaseDate`  Date
							 
						 
					
						
							
								
									
										
										
										
											2021-11-16 05:13:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								*  `updateURL`  string
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-10-23 15:50:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Emitted when an update has been downloaded.
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-10-23 20:11:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								On Windows only `releaseName`  is available.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-20 21:12:47 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								**Note:** It is not strictly necessary to handle this event. A successfully
							 
						 
					
						
							
								
									
										
										
										
											2018-07-24 15:33:53 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								downloaded update will still be applied the next time the application starts.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-04-14 21:29:36 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Event: 'before-quit-for-update'
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-04-16 08:13:04 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								This event is emitted after a user calls `quitAndInstall()` .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								When this API is called, the `before-quit`  event is not emitted before all windows are closed. As a result you should listen to this event if you wish to perform actions before the windows are closed while a process is quitting, as well as listening to `before-quit` .
							 
						 
					
						
							
								
									
										
										
										
											2018-04-14 21:29:36 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-19 18:55:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Methods
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The `autoUpdater`  object has the following methods:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-02-15 13:58:59 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### `autoUpdater.setFeedURL(options)`
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-02-15 13:58:59 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								*  `options`  Object
							 
						 
					
						
							
								
									
										
										
										
											2021-11-16 05:13:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  *  `url`  string
							 
						 
					
						
							
								
									
										
										
										
											2024-03-26 04:28:47 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  *  `headers`  Record\<string, string\> (optional) _macOS_  - HTTP request headers.
							 
						 
					
						
							
								
									
										
										
										
											2021-11-16 05:13:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  *  `serverType`  string (optional) _macOS_  - Can be `json`  or `default` , see the [Squirrel.Mac][squirrel-mac]
							 
						 
					
						
							
								
									
										
										
										
											2018-02-15 13:58:59 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    README for more information.
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-10 15:55:42 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Sets the `url`  and initialize the auto updater.
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-07-15 00:07:17 +12:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### `autoUpdater.getFeedURL()`
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-16 05:13:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Returns `string`  - The current update feed URL.
							 
						 
					
						
							
								
									
										
										
										
											2016-07-15 00:07:17 +12:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-19 18:55:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### `autoUpdater.checkForUpdates()`
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-14 15:43:35 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-13 16:03:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Asks the server whether there is an update. You must call `setFeedURL`  before
							 
						 
					
						
							
								
									
										
										
										
											2014-02-02 20:37:46 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								using this API.
							 
						 
					
						
							
								
									
										
										
										
											2015-10-23 15:50:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-08 02:03:34 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								**Note:** If an update is available it will be downloaded automatically.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Calling `autoUpdater.checkForUpdates()`  twice will download the update two times.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-10-30 12:17:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### `autoUpdater.quitAndInstall()`
 
							 
						 
					
						
							
								
									
										
										
										
											2015-10-23 15:50:55 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-03 15:30:54 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Restarts the app and installs the update after it has been downloaded. It
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								should only be called after `update-downloaded`  has been emitted.
							 
						 
					
						
							
								
									
										
										
										
											2015-10-23 20:11:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-12-19 15:39:57 +09:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Under the hood calling `autoUpdater.quitAndInstall()`  will close all application
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								windows first, and automatically call `app.quit()`  after all windows have been
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								closed.
							 
						 
					
						
							
								
									
										
										
										
											2016-11-16 10:35:02 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-20 21:12:47 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								**Note:** It is not strictly necessary to call this function to apply an update,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								as a successfully downloaded update will always be applied the next time the
							 
						 
					
						
							
								
									
										
										
										
											2018-07-24 15:33:53 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								application starts.
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 20:29:49 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-10-23 20:11:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[squirrel-mac]: https://github.com/Squirrel/Squirrel.Mac
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[server-support]: https://github.com/Squirrel/Squirrel.Mac#server -support
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[squirrel-windows]: https://github.com/Squirrel/Squirrel.Windows
							 
						 
					
						
							
								
									
										
										
										
											2023-04-15 21:20:59 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[installer]: https://github.com/electron-archive/grunt-electron-installer
							 
						 
					
						
							
								
									
										
										
										
											2016-05-06 10:05:12 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[installer-lib]: https://github.com/electron/windows-installer
							 
						 
					
						
							
								
									
										
										
										
											2023-01-02 02:52:18 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[electron-forge-lib]: https://github.com/electron/forge
							 
						 
					
						
							
								
									
										
										
										
											2023-03-21 08:39:19 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[app-user-model-id]: https://learn.microsoft.com/en-us/windows/win32/shell/appids
							 
						 
					
						
							
								
									
										
										
										
											2019-07-22 08:20:43 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter