Jump to content

RunOnce


Recommended Posts

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...