L
L
leviathan2020-09-15 15:03:27
Python
leviathan, 2020-09-15 15:03:27

Autoload pyinstaller script from admin without prompt?

I compile the project into exe with this command:
pyinstaller --onefile --uac-admin main.py
The essence of the script is as simple as possible, it creates files according to timing, through the usual open ().
Added this exe to the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run

For the script to work correctly, it must be run as an admin, otherwise it simply ignores open(). But it turns out that after each start of the system, a dialog box appears in which you need to confirm the launch of the script. Is it possible to somehow autoload this script from the admin, without a constant request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor T2, 2020-09-15
@The_Lars

--uac-admin remove
Try running the executable with psexec
psexec.exe -u admin user -p password yourprogram [arguments]
This used to work.
Psexec: https://docs.microsoft.com/en-us/sysinternals/down...
The second way:
Put the executable in the scheduled tasks,
I think there is an event at system startup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question