WindowsMixin mixin

Common code for Windows shells.

Mixin Applications

Properties

canModifyPath bool
Returns true if this shell supports modifying the shell's PATH
no setter
hashCode int
The hash code for this object.
no setterinherited
installInstructions String
Returns the instructions to install DCli.
no setter
isPrivilegedPasswordRequired bool
Returns true if running a privileged action woulduser cause a password to be requested.
no setter
isPrivilegedProcess bool
Returns true if the current process is running with elevated privileges e.g. Is running as an Administrator.
no setter
isPrivilegedUser bool
Returns true if the current process is running with elevated privileges e.g. Is running as an Administrator.
no setter
isSudo bool
On Windows this is always false.
no setter
loggedInUser String?
no setter
loggedInUsersHome String
Attempts to retrive the logged in user's home directory.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addFileAssociation(String dcliPath) → void
Add a file association so that typing the name of a dart script on the cli launches dcli which in turn launches the script.
addFileAssociationv2() → void
Add a file association so that typing the name of a dart script on the cli launches dcli which in turn launches the script.
addToPATH(String path) bool
Adds a path to the start script returns true if adding the path was successful
appendToPATH(String path) bool
Appends path to the end of the PATH by updating the Windows Registry. We update the user's PATH (HKEY_CURRENT_USER) rather than the system path so this change will only affect the logged in user.
checkInstallPreconditions() String?
Check if the shell has any notes re: pre-isntallation conditions.
inDeveloperMode() bool
Windows 10+ has a developer mode that needs to be enabled to create symlinks without escalated prividedges. For details on enabling dev mode on windows see: https://dcli.onepub.dev/getting-started/installing-on-windows
install({bool installDart = true, bool activate = true}) bool
Called to install the windows specific dart/dcli components.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prependToPATH(String path) bool
Prepend path to the end of the PATH by updating the Windows Registry. We update the user's PATH (HKEY_CURRENT_USER) rather than the system path so this change will only affect the logged in user.
privilegesRequiredMessage(String app) String
releasePrivileges() → void
NO OP under windows
restorePrivileges() → void
NO OP under windows
toString() String
A string representation of this object.
inherited
withPrivileges(RunPrivileged action, {bool allowUnprivileged = false}) → void
Run action with root UID and gid

Operators

operator ==(Object other) bool
The equality operator.
inherited