oxen-electron-gui-wallet icon indicating copy to clipboard operation
oxen-electron-gui-wallet copied to clipboard

Add Windows Defender Exception automatically upon installation (enhancement UX)

Open mechanator opened this issue 3 years ago • 1 comments
trafficstars

When installing the GUI wallet for Windows, the Windows Defender either alerts the user to a false positive of the Oxen wallet .exe as being a virus. Or, sometimes Windows OS just deletes the executables after the installation and doesn't notify anyone. This leads to a broken installation. The end user has to hunt down the manual method to add an exception to the OS and causes distrust of the application itself. To reduce every growing instances of support calls and tutorial support simply have the installer application put the exception in for them. Even though the docs section at oxen.io has the manual method there, wouldn't it be simpler to preempt the whole issue and just add the exception programmatically?

You can easily perform this from the elevated cmd shell in Windows 10 using the following command line: powershell -inputformat none -outputformat none -NonInteractive -Command Add-MpPreference -ExclusionPath "C:(Installed directory)"

Where (Installed directory) is derived as the installation drive letter, and the prefix "\Users(accountname)\AppData\Local\Programs\Oxen Electron Wallet"
Where (accountname) is the user's logon name,

Another method:

Add the path to the Windows Registry with the trusted installer with permissions: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths devxexec.exe /user:TrustedInstaller cmd where cmd is the .reg keyfile of the path to be added.

References: https://stackoverflow.com/questions/40233123/windows-defender-add-exclusion-folder-programmatically

mechanator avatar Dec 04 '21 17:12 mechanator

I assume a cleaner fix would be to simply not ship mining code anymore, as it is a) not used anymore, and b) usually the culprit when it comes to false positives.

mdPlusPlus avatar Aug 15 '22 13:08 mdPlusPlus