-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Access is denied #152
Comments
wonder if its related to windows registry in any way |
fyi i use xcap in a tauri app and by running the app in admin it solves the issue (kinda annoying, wonder if there is alternative way to do this) |
nvm: user is getting these errors even with admin |
Can you provide a sample code? |
atm this is the code: https://github.com/mediar-ai/screenpipe/blob/main/screenpipe-vision/src/capture_screenshot_by_window.rs @m13v can you help? can we create a code that reproduce this error? |
This should only output logs to the console and should not cause a crash. If your program does not depend on app_name, theoretically, it should not be affected. |
@nashaofu not sure to understand, do you know any way not to require admin right to use PS: $100 bounty for this fix |
@nashaofu i think this occurs when there is window like task manager open and the app is not able to capture it due to elevated permission requirement |
this is what claude suggest: // ... existing imports ...
use windows::Win32::UI::WindowsAndMessaging::{GetWindowLongW, GWL_EXSTYLE, WS_EX_TOPMOST};
// ... existing code ...
#[cfg(target_os = "windows")]
fn is_window_elevated(window: &Window) -> bool {
unsafe {
let hwnd = window.hwnd() as isize;
let ex_style = GetWindowLongW(hwnd, GWL_EXSTYLE);
(ex_style & WS_EX_TOPMOST.0 as i32) != 0
}
}
#[cfg(not(target_os = "windows"))]
fn is_window_elevated(_window: &Window) -> bool {
false
}
// ... rest of the file ... |
if this is true, i'd suggest having a propery |
do you have any idea how to fix this?
running as admin does not fix the error, also tried to tweak windows defender settings
i'm trying to see if windows require permission on newer versions, could it be?
The text was updated successfully, but these errors were encountered: