[GH-ISSUE #526] Blocker of generating output in critical dirs #407

Closed
opened 2026-02-26 12:21:30 +03:00 by kerem · 7 comments
Owner

Originally created by @mostypc123 on GitHub (Mar 16, 2025).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/526

Originally assigned to: @brentvollebregt on GitHub.

New Feature Description

A blocker of directories where the user should not generate output files, such as system32. If you run auto-py-to-exe as an admin, it could mess up your windows installation.

Reason For New Feature

I was using auto-py-to-exe and it set the output dir to system32. As I do use terminal as admin a lot, it could write to system32 and it might as well just break Windows.

Originally created by @mostypc123 on GitHub (Mar 16, 2025). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/526 Originally assigned to: @brentvollebregt on GitHub. **New Feature Description** A blocker of directories where the user should not generate output files, such as system32. If you run auto-py-to-exe as an admin, it could mess up your windows installation. **Reason For New Feature** I was using auto-py-to-exe and it set the output dir to system32. As I do use terminal as admin a lot, it could write to system32 and it might as well just break Windows.
kerem 2026-02-26 12:21:30 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 16, 2025):

👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.

Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.

<!-- gh-comment-id:2727586842 --> @github-actions[bot] commented on GitHub (Mar 16, 2025): 👋 Hi, just a reminder that if you haven't read [the help post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/) yet, give it a read to see if your issue is covered in it and make sure to follow [the debugging section](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#debugging). Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help [post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/), [video](https://youtu.be/OZSZHmWSOeM) or create a [new discussion](https://github.com/brentvollebregt/auto-py-to-exe/discussions).
Author
Owner

@brentvollebregt commented on GitHub (Mar 17, 2025):

Might be better as a warning added through get_warnings in /auto_py_to_exe/utils.py instead of fully blocking?

Generating the output folder in C:\Windows\System32 shouldn't break things - but I understand it's not ideal, hence just the warning.

<!-- gh-comment-id:2728877530 --> @brentvollebregt commented on GitHub (Mar 17, 2025): Might be better as a warning added through `get_warnings` in `/auto_py_to_exe/utils.py` instead of fully blocking? Generating the output folder in `C:\Windows\System32` shouldn't break things - but I understand it's not ideal, hence just the warning.
Author
Owner

@mostypc123 commented on GitHub (Mar 17, 2025):

yeah that would be better

<!-- gh-comment-id:2729300324 --> @mostypc123 commented on GitHub (Mar 17, 2025): yeah that would be better
Author
Owner

@brentvollebregt commented on GitHub (Mar 19, 2025):

I have a change in ac21cda41812e1c3fb83e8cac33f72dbc12e038a which looks fine - however it's missing a why.

I'm unable to see why running auto-py-to-exe in C:\Windows\System32 is an issue? I understand it wouldn't be recommended, but it's just adding an output folder by default which probably doesn't exist already. I have seen many people asking for help running in C:\Windows\System32 and not complaining about it breaking anything.

@mostypc123 do you know how this could "break windows"?

<!-- gh-comment-id:2735918032 --> @brentvollebregt commented on GitHub (Mar 19, 2025): I have a change in ac21cda41812e1c3fb83e8cac33f72dbc12e038a which looks fine - however it's missing a why. I'm unable to see why running auto-py-to-exe in `C:\Windows\System32` is an issue? I understand it wouldn't be recommended, but it's just adding an `output` folder by default which probably doesn't exist already. I have seen many people asking for help running in `C:\Windows\System32` and not complaining about it breaking anything. @mostypc123 do you know how this could "break windows"?
Author
Owner

@mostypc123 commented on GitHub (Mar 21, 2025):

you're right - not really break windows, but it's not good to do it.

<!-- gh-comment-id:2742341567 --> @mostypc123 commented on GitHub (Mar 21, 2025): you're right - not really break windows, but it's not good to do it.
Author
Owner

@mostypc123 commented on GitHub (Mar 21, 2025):

I think you can remove the why from the warning and keep it as it is

<!-- gh-comment-id:2742344979 --> @mostypc123 commented on GitHub (Mar 21, 2025): I think you can remove the why from the warning and keep it as it is
Author
Owner

@brentvollebregt commented on GitHub (Mar 22, 2025):

This is now on master

<!-- gh-comment-id:2744821958 --> @brentvollebregt commented on GitHub (Mar 22, 2025): This is now on master
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#407
No description provided.