-
Notifications
You must be signed in to change notification settings - Fork 20
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
Autorun on start-up feature #7
Comments
Maybe you can try
Here is an example:
This means creating a task called "TCC_G15", which will run the program with admin privileges when login. I don't know how to use it in a product, but I have seen some apps in my computer using this to autorun on start-up, maybe you can try it. |
Thanks for the hint! I'll make sure to give it a try |
@T7imal, does this method work on your system? I've tried to create a task, but it won't run the program on my machine. The task scheduler always reports status "The task has not yet run. (0x41303)" |
Yes, it works, and the task scheduler shows "The task is currently running. (0x41301)". Maybe the user you used don't have enough privileges? |
Also I find out the how the app I mentioned uses the task scheduler. It has a xml file which contains the needed information, and it will detect its address and write it into the xml file. After that it uses the xml file to create the task. I exported mine as an example:
And use it with
|
Hello, I don't know much about programming, but I found that the purpose of booting self-start can be achieved using system settings. The specific method is to enter ‘shell:startup’ after win+R, drag the ‘.exe’ file or shortcut in, and select the object's right-click property to set the running mode to minimized. This not only realizes the automatic startup of the boot, but also does not pop up at startup, so that there is no sense of disturbing. |
It doesn't work on my system and people say that this method only work for programs that don't require administrator privileges. I wonder why it works on your system. |
Sorry for the mistake in my formulation, to be precise, only shortcuts work fine, and '.exe' files do not launch. And there is no minimization option for '.exe' files. If it is not for this reason that it cannot be used, then sorry I don't know the reason for the time being. |
Thanks for all your comments, it was very helpful ♡ I will try to return to this feature when I have time, probably this month. The Task Scheduler method seems to work on my machine, but every once in a while the program won't start on a reboot... No idea why and if this is specific to my system only. But I guess at least having that is better than nothing. |
Accidently I have found out the reason why the start-up folder method doesn't work on my system. What I have done is:
Then the start-up folder method works. |
@T7imal nice catch! Not sure how we can use it though... We cannot possibly start asking users to change their default security settings. |
The Autorun feature proved to be difficult to implement in windows. The main issue here is to run the program with admin privileges. No doubt the admin-silent-autorun was abused in the past by various malwares, so Microsoft made it difficult to automatically run your app with admin privileges without prompting the user.
I have tried to add the program to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
which solved the autorun part, but it grands no admin rights.Adding the program to
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
withRUNASADMIN
value blocks the program start completely (probably, due to the security reasons)...If anyone has experience on the issue, your input would be very appreciated.
The text was updated successfully, but these errors were encountered: