Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: not able to connect to network due to non-admin rights on PC #159

Open
2 tasks
geetanshjain opened this issue Jun 17, 2021 · 0 comments
Open
2 tasks

Comments

@geetanshjain
Copy link
Contributor

Expected Behavior

In Windows, when we try to connect to a networks, the connection fails if the user don't have admin privileges on the laptop. nodeWifiConnect.xml which is a temporary fails to create without admin rights. It should be created in a temporary location as its already a temp file and should work for non-admin users also.

Current Behavior

In Windows, when we try to connect to a networks, the connection fails if the user don't have admin privileges on the laptop. nodeWifiConnect.xml which is a temporary fails to create without admin rights.

image

Affected features

  • node API
  • cli

Possible Solution

nodeWifiConnect.xml temporary file should be created at a temporary solution so that non admin users can also connect to the network without need to run as an administrator.

Steps to Reproduce (for bugs)

  1. Run the connectWindows API without the admin rights.
  2. Connection will fail with the attached message (EPERM)

Context

Your Environment

  • OS: Microsoft windows 10
  • node-wifi version: 2.0.14
  • wifi card: Intel(R) Dual Band Wireless-AC 8265
friedrith pushed a commit that referenced this issue Aug 11, 2021
## Description

While connecting to a network in windows by a non-admin user, the connection fails if the project/package-workspace is under some restricted location (Ex: Program Files) because the nodeWifiConnect.xml is created is not getting created due to permission issues.
Changed the location of nodeWifiConnect.xml to be created in a temporary directory (C:\Users<userId>\AppData\Local\Temp) so that work flow is uninterrupted for non-admin user also.

## Motivation and Context
This change is required as all window users (Admin and Non-Admin) should be able to connect to the network.
#159 

## How Has This Been Tested?

After the required changes are done, we tried to connect to the network in a non-admin user machine, which works as expected.

## Types of changes

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Refactorization (non-functional change which improve code readibility)
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

No branches or pull requests

1 participant