'How to start an exe on windows startup with high priority (like wallpaper engine does)
So basically i have found a wallpaper that animates the proccess of a computer starting, type thing (it looks like this: https://www.youtube.com/watch?v=Wnj34q-8IPA)(Credits to Bemuse)
At the begining it shows some texts , one after the other.. and at the end it says "complete"
in my case i edited the wallpaper js script and added my startup programs to be shown at the start (when the texts appear.. as shown below)
after that, this screen pops up
what i want.. is to hide my desktop icons for as long as the texts on picture 1 are shown and unhide them when the screen in picture 2 is shown.
if you see in the video.. right after the text "complete" is shown.. on the left side, the clock and a light blue fading border flickers for a bit, and then stays on screen.. when this happens.. i want my icons to unhide
so i found a tool called AutoHotkey which can hide icons of your desktop with a shortcut key.. in this case i went with f10
i made a script with python that basically just automates this action
- Starts the AutoHotkey script (which lets me hide wallpapers with f10)
- Presses f10 (hides my desktop icons)
- Waits 32 sec (which is exactly the time the wallpaper takes to finish showing all the texts)
- Presses f10 (unhides my desktop icons)
- Stops the AutoHotkey program from running
heres the script
import keyboard, time, os
os.startfile(r"C:\Users\peter\Documents\Programming\Python\Python Projects\Random\Hide Icons\HideIconsScript.ahk")
keyboard.press("f10")
keyboard.release("f10")
time.sleep(32)
keyboard.press("f10")
keyboard.release("f10")
os.system("taskkill /im AutoHotkey.exe")
so i put this programs shortcut on my startup folder
the problem is though that Wallpaper engine starts way earlier than the startup apps because it has a specific windows service that lets it run in high priority on startup.. so as a result my python script (mentioned above) which has the default priority (normal).. delays to start so much that when it finally runs.. the wallpaper has already played through the text phase.. so its a bit useless
so what i want to do is start my python script at the same time as wallpaper engine starts..
i have tried using task scheduler.. i put it to run with priority 0 (real time) with an xml script but it didnt seem to help
i have tried editing the registry so i can make a windows service like wallpaper engine has.. but that didnt work either.. cause i dont know how registry works exactly.. and there arent many good tutorials to show me what i want..
and finally my last hope was to try and work around Bemuse (the guy who made the wallpaper) js files.. to add a run command to my python script from inside the wallpaper but still.. couldnt cause i dont know that good of js and besides.. couldnt understand a lot from his code (obviously)
I know that im not that good on explaining but if someone understands what i mean.. and what i want to do.. please help me.. i 've spent so many hours and got nothing..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
