From 6e4496cb16a21cf38a281f7c55a0cf39ed8bd5e4 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 13 Aug 2018 08:38:57 +0200 Subject: [PATCH] Add --disable-start-on-logon command line parameter and show portable path in the gui if applicable --- source/gui/installerGui.py | 19 ++++++++++++++++--- source/nvda.pyw | 1 + user_docs/en/changes.t2t | 6 ++++-- user_docs/en/userGuide.t2t | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/source/gui/installerGui.py b/source/gui/installerGui.py index bfef139bc3d..1960e9b13f8 100644 --- a/source/gui/installerGui.py +++ b/source/gui/installerGui.py @@ -77,7 +77,15 @@ def doInstall(createDesktopShortcut,startOnLogon,copyPortableConfig,isUpdate,sil def doSilentInstall(startAfterInstall=True): prevInstall=installer.comparePreviousInstall() is not None - doInstall(installer.isDesktopShortcutInstalled() if prevInstall else True,config.getStartOnLogonScreen() if prevInstall else True,False,prevInstall,silent=True,startAfterInstall=startAfterInstall) + startOnLogon=False if globalVars.appArgs.disableStartOnLogon else config.getStartOnLogonScreen() if prevInstall else True + doInstall( + installer.isDesktopShortcutInstalled() if prevInstall else True, + startOnLogon, + False, + prevInstall, + silent=True, + startAfterInstall=startAfterInstall + ) class InstallerDialog(wx.Dialog): @@ -101,8 +109,11 @@ def __init__(self, parent, isUpdate): # Translators: The label of a checkbox option in the Install NVDA dialog. startOnLogonText = _("Use NVDA on the Windows &logon screen") self.startOnLogonCheckbox = sHelper.addItem(wx.CheckBox(self, label=startOnLogonText)) - self.startOnLogonCheckbox.Value = config.getStartOnLogonScreen() if self.isUpdate else True - + self.startOnLogonCheckbox.Value = ( + False if globalVars.appArgs.disableStartOnLogon else + config.getStartOnLogonScreen() if self.isUpdate else True + ) + shortcutIsPrevInstalled=installer.isDesktopShortcutInstalled() if self.isUpdate and shortcutIsPrevInstalled: # Translators: The label of a checkbox option in the Install NVDA dialog. @@ -203,6 +214,8 @@ def __init__(self, parent): dirDialogTitle = _("Select portable directory") directoryEntryControl = groupHelper.addItem(gui.guiHelper.PathSelectionHelper(self, browseText, dirDialogTitle)) self.portableDirectoryEdit = directoryEntryControl.pathControl + if globalVars.appArgs.portablePath: + self.portableDirectoryEdit.Value = os.path.abspath(globalVars.appArgs.portablePath) # Translators: The label of a checkbox option in the Create Portable NVDA dialog. copyConfText = _("Copy current &user configuration") diff --git a/source/nvda.pyw b/source/nvda.pyw index 03f150c23d1..1d418bfa817 100755 --- a/source/nvda.pyw +++ b/source/nvda.pyw @@ -102,6 +102,7 @@ installGroup.add_argument('--create-portable',action="store_true",dest='createPo installGroup.add_argument('--create-portable-silent',action="store_true",dest='createPortableSilent',default=False,help="Creates a portable copy of NVDA silently (does not start the new copy after installation).") parser.add_argument('--portable-path',dest='portablePath',default=None,type=decodeMbcs,help="The path where a portable copy will be created") parser.add_argument('--launcher',action="store_true",dest='launcher',default=False,help="Started from the launcher") +parser.add_argument('--disable-start-on-logon',action="store_true",dest='disableStartOnLogon',default=False,help="When installing, disable NVDA's start on the logon screen") # This option currently doesn't actually do anything. # It is passed by Ease of Access so that if someone downgrades without uninstalling (despite our discouragement), # the downgraded copy won't be started in non-secure mode on secure desktops. diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index 99d639b2bb6..6691376562c 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -6,10 +6,12 @@ What's New in NVDA = 2018.4 = == New Features == - - +- Added the "--disable-start-on-logon" command line parameter to allow silent installations of NVDA that don't run at the logon screen by default. (#8574) + + == Changes == - "Report help balloons" in the Object Presentations dialog has been renamed to "Report notifications" to include reporting of toast notifications in Windows 8 and later. (#5789) +- When NVDA is started with the "--portable-path" command line parameter, the provided path is automatically filled in when trying to create a portable copy of NVDA using the NVDA menu. == Bug Fixes == diff --git a/user_docs/en/userGuide.t2t b/user_docs/en/userGuide.t2t index a61ae39efa6..69db4ceb1b4 100644 --- a/user_docs/en/userGuide.t2t +++ b/user_docs/en/userGuide.t2t @@ -2757,6 +2757,7 @@ Following are the command line options for NVDA: | None | --no-sr-flag | Don't change the global system screen reader flag | | None | --install | Installs NVDA (starting the newly installed copy) | | None | --install-silent | Silently installs NVDA (does not start the newly installed copy) | +| None | --disable-start-on-logon | When installing, disable NVDA's start on the logon screen | | None | --create-portable | Creates a portable copy of NVDA (starting the newly created copy). Requires --portable-path to be specified | | None | --create-portable-silent | Creates a portable copy of NVDA (does not start the newly installed copy). Requires --portable-path to be specified | | None | --portable-path=PORTABLEPATH | The path where a portable copy will be created |