installer module
- installer._getWSH()
- installer.createShortcut(path, targetPath=None, arguments=None, iconLocation=None, workingDirectory=None, hotkey=None, prependSpecialFolder=None)
- installer.getStartMenuFolder(noDefault=False)
- installer.getInstallPath(noDefault=False)
- installer.comparePreviousInstall()
Returns 1 if the existing installation is newer than this running version, 0 if it is the same, -1 if it is older, None if there is no existing installation.
- installer.getDocFilePath(fileName, installDir)
- installer.copyProgramFiles(destPath)
- installer.copyUserConfig(destPath)
- installer.removeOldLibFiles(destPath, rebootOK=False)
Removes library files from previous versions of NVDA. @param destPath: The path where NVDA is installed. @type destPath: string @param rebootOK: If true then files can be removed on next reboot if trying to do so now fails. @type rebootOK: boolean
- installer.removeOldProgramFiles(destPath)
- installer.getUninstallerRegInfo(installDir: str) Dict[str, str | int]
Constructs a dictionary that is written to the registry for NVDA to show up in the Windows “Apps and Features” overview.
- installer.getDirectorySize(path: str) int
Calculates the size of a directory in bytes.
- installer.registerInstallation(installDir: str, startMenuFolder: str, shouldCreateDesktopShortcut: bool, startOnLogonScreen: bool, configInLocalAppData: bool = False) None
- installer._createShortcutWithFallback(path, targetPath=None, arguments=None, iconLocation=None, workingDirectory=None, hotkey=None, prependSpecialFolder=None, fallbackHotkey=None, fallbackPath=None)
Sometimes translations are used (for
path
orhotkey
arguments) which include unicode characters which cause the createShortcut method to fail. In these cases, try again using the English string if it is provided via thefallbackHotkey
/fallbackPath
arguments.
- installer._updateShortcuts(NVDAExe, installDir, shouldCreateDesktopShortcut, slaveExe, startMenuFolder) None
- installer.isDesktopShortcutInstalled()
- installer.unregisterInstallation(keepDesktopShortcut=False)
- installer.registerAddonFileAssociation(slaveExe)
- installer.unregisterAddonFileAssociation()
- installer._deleteKeyAndSubkeys(key, subkey)
- exception installer.RetriableFailure
Bases:
Exception
- installer.tryRemoveFile(path: str, numRetries: int = 6, retryInterval: float = 0.5, rebootOK: bool = False)
- installer.tryCopyFile(sourceFilePath, destFilePath)
- installer._revertGroupDelete(tempDir: str, installDir: str)
Move all files in tempDir back to installDir, retaining the same relative path
- installer._deleteFileGroupOrFail(installDir: str, relativeFilepaths: Iterable[str], numTries: int = 6, retryWaitInterval: float = 0.5)
Delete a group of files in the installer folder. Each file tries to be deleted up to
numTries
times, with a wait ofretryWaitInterval
seconds between each attempt. If all tries to delete a file fail, revert the deletion of all other files.- Parameters:
installDir – an iterable of file paths relative to installDir
relativeFilepaths – an iterable of file paths relative to installDir
- Raises:
RetriableFailure – if the files fail to be deleted.
- installer.install(shouldCreateDesktopShortcut: bool = True, shouldRunAtLogon: bool = True)
- installer.removeOldLoggedFiles(installPath)
- installer.createPortableCopy(destPath, shouldCopyUserConfig=True)
- installer.registerEaseOfAccess(installDir)