Skip to content

Add run as admin suggestion for Windows - #78

Merged
MCMi460 merged 2 commits into
MCMi460:developmentfrom
HotaruBlaze:adminNotice
May 31, 2023
Merged

MCMi460 merged 2 commits into
MCMi460:developmentfrom
HotaruBlaze:adminNotice

Conversation

@HotaruBlaze

Copy link
Copy Markdown
Contributor

If you are running Discord as administrator, NSO-RPC will fail to connect to the discord IPC pipe due to windows permissions.

I attempted to catch the '[WinError 5] Access is denied' exception at client/cli.py#L50-L56, as it returns an IOError exception, however I had multiple timing and scope(?) issues around that, even trying to add handler and extra stuff around a simple boolean had consistency issues, reporting not connected to discord, then afterwards saying we are fine etc.

This solution's main issue is that its assuming on windows, the only reason for NSO-RPC to have issues connecting to discord is because Discord is running with Admin privileges.

Note: This will give a false positive telling the user to try running NSO-RPC with Admin if Discord is not running.

@HotaruBlaze

Copy link
Copy Markdown
Contributor Author

Forgot to add the preview of the change, when its unable to connect to discord.
6Djz8hGiQJEnL0Fe

@MCMi460
MCMi460 merged commit bf4ede1 into MCMi460:development May 31, 2023
@MCMi460

MCMi460 commented May 31, 2023

Copy link
Copy Markdown
Owner

I made some changes upstream that should solve those false positives (instead editing the message to display the actual error under those circumstances). Thank you for noticing this and working to fix it so quickly!

@HotaruBlaze
HotaruBlaze deleted the adminNotice branch April 29, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants