Valnurat Posted April 13, 2016 Posted April 13, 2016 I only have this in the msgbox.exe MsgBox(0,"1","Test") I have added a key to the RunOnce registry and it works. RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "SCCM", "REG_SZ", "%logonserver%\netlogon\msgbox.Exe") But when I reboot and I login to the computer I expect a msgbox to apear, but it does not. Why can that be? Yours sincerely Kenneth.
MattHiggs Posted April 13, 2016 Posted April 13, 2016 Did you compile the executable to require admin credentials?
MilesAhead Posted April 13, 2016 Posted April 13, 2016 Programs in RunOnce are run before the user has logged in. I wrote a small script to delete every instance of index.dat on my C: drive. I set it to RunOnce. It could delete all the index.dat files because the user had not logged in yet(even if there is no explict login screen because the user login is automatic with no password.) What happened in my case is I could see the system wait for all the files to be deleted before I got the desktop. I guess it is similar to running a program as a service in that there should be no user interface. RunOnce is most used by installers that clean up no longer needed files during the reboot after an install. My Freeware Page
Valnurat Posted April 13, 2016 Author Posted April 13, 2016 (edited) 5 hours ago, MattHiggs said: Did you compile the executable to require admin credentials? #include <MsgBoxConstants.au3> #RequireAdmin If IsAdmin() Then MsgBox($MB_SYSTEMMODAL, "", "The script is running with admin rights.") I tried this, but I get no messagebox. Edited April 13, 2016 by Valnurat Yours sincerely Kenneth.
Valnurat Posted April 13, 2016 Author Posted April 13, 2016 5 hours ago, MilesAhead said: Programs in RunOnce are run before the user has logged in. I wrote a small script to delete every instance of index.dat on my C: drive. I set it to RunOnce. It could delete all the index.dat files because the user had not logged in yet(even if there is no explict login screen because the user login is automatic with no password.) What happened in my case is I could see the system wait for all the files to be deleted before I got the desktop. I guess it is similar to running a program as a service in that there should be no user interface. RunOnce is most used by installers that clean up no longer needed files during the reboot after an install. How is it possible for me to continue a installation after a reboot? Yours sincerely Kenneth.
MilesAhead Posted April 13, 2016 Posted April 13, 2016 I just learned this by searching now. There is a program in system32 called runonce.exe. Evidently it is a wrapper for the RunOnce key that kludges around the login issue. You might ask on Inno Setup forum as that install maker is pretty open and the author may be willing to discus the nuances of the install spanning booting. My Freeware Page
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