Python script Admin?

Hello, I have written a Python program, this must change the contents of a file for a function. This also works so far, but I have now converted this with Auto-py-to-exe into a folder, and also the required file is inserted. When I open this exe file, everything works! The problem comes, if I with the help of "InstallForge" the file into an Installer file converted, the file on another PC transfer, the PC once down and again up drove, the software open, because from then on, I can not use the function, in which a file is described, without the software crashes, also then the file is not saved. If I run the software as admin, it doesn't get the error, so that means yes, to be able to rewrite files in the folder, you need admin permission. But it's just inconvenient to always be able to open the app by right clicking and then using "run as administrator". Is there any way to simplify this?

1st Dec 2022, 8:05 PM
TJ06 - avatar
2 Answers
+ 2
Well, what I am hearing from your lines is: - basically you have written a "virus" which changes executable(?) files in the filesystem - you want to run it on a different computer - and you want it to have admin privileges I think any decent system administrator would scratch their head over this. Sounds like a security disaster. Anyway, I am not sure if this would work on your specific version of operating system, but you might be able to grant a system privilege to your program, to 'always run as administrator'. https://www.itpro.com/software/367829/how-to-make-programs-always-run-as-admin-on-windows/
1st Dec 2022, 8:45 PM
Tibor Santa
Tibor Santa - avatar
+ 1
No, it is not a virus, it is a software that contains a file that contains configurations of the software. Unfortunately, the contents of this file cannot be edited, which is a bit inconvenient because it does not allow you to save settings unless the software is run as admin.
1st Dec 2022, 9:17 PM
TJ06 - avatar