kubie Posted April 21, 2010 Posted April 21, 2010 I have an autoIT script in the runonce. After the reboot, the autoIT script runs and stops the desktop from displaying. I can kill the autoIT script and my desktop comes up right away. Any way to fix this? Or any suggestions to get an autoIT script to run automatically after login? Thanks, kubie
Developers Jos Posted April 21, 2010 Developers Posted April 21, 2010 (edited) That is how RUNONCE works. The loading of other stuff will only start after the RUNONCE program finished. if you want to start the script and the desktop to appear you need to put it in RUN. Edited April 21, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
MHz Posted April 22, 2010 Posted April 22, 2010 (edited) Welcome, Lets be clear about this vague use of RunOnce mentioned in the topic. Is this RunOnce in HKCU hive? i.e "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce" which continues to the desktop or is this in HKLM hive? i.e "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce" which halts until end of execution, then continues to the desktop? Or is this the infamous RunOnce that some use that is sometimes known as RunOnceEx i.e "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx" which halts until end of execution, then continues to the desktop? I will add to what has already been suggested that you can use either startup folder that is seen in the start menu on the desktop. You can use the "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce" as mentioned above. Edited April 22, 2010 by MHz
kubie Posted April 22, 2010 Author Posted April 22, 2010 Yup. That was it. Thanks for the prompt responce.
kubie Posted April 22, 2010 Author Posted April 22, 2010 I had it in the 'HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce'. And it did hault everything. I move it to the run 'HKLM\Software\Microsoft\Windows\CurrentVersion\Run' and it works fine I just need to add a cleanup script to remove it.
MHz Posted April 22, 2010 Posted April 22, 2010 You can use 'HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce' if suitable. If it is an automated install or other that can not be disturbed by other windows etc, then you could possibly just restart the script so the registry value will clear and continue but your re-spawned script will do its thing. You could add such as this at the top of your script noting that it expects no /restart switch initially. If Not $CMDLINE[0] Then Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptFullPath & '" /restart') Exit EndIf ; your code here to perform Then there is nothing to cleanup.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now