I saw early postings about RunOnceEx in this mailing list circa January 2003, however the problems they presented were never fixed.
Some programs come with simple INF installers because people can cheaply create an INF file, and use a free Setup.exe bootstrap file that reads the name of an INF file from Setup.ini or something similar. These programs do not have any way of processing RunOnceEx themselves.
In the distant past before I had converted to Linux and wine, I used to deal with such programs quite a bit;
RunOnceEx was Microsoft's way of allowing simple installers to register files, especially if a reboot and wininit was necessary to overwrite files.
The basic structure of the registry format is: [Software\Microsoft\Windows\CurrentVersion\RunOnceEx\Number] "Number"="program.exe arguments" "Number"="c:\somepath\somedll.dll|SomeExportedFunction"
Number is nothing more than a number. All commands are processed in sequential order, first by key, then by value. If there is no pipe symbol in the line ('|'), the data of the value is executed as a program, with all following tokens passed on as arguments. However, if the pipe symbol is included, the portion to the left is treated as a DLL, and calls the exported function of the name to the right of the symbol.
Once all values in a key are processed, the key is deleted, and the process starts with the next key.
There is one subkey that has a special meaning: All keys/values in [Software\Microsoft\Windows\CurrentVersion\RunOnceEx\Setup] are not processed at boot-up. Rather, they are read by the program runonce.exe, not included in wine. It is through this key that one gets the annoying "Updating Windows" box in the upper left corner of the screen, listing tasks being performed. I believe Powertoys for Windows 98 utilized this feature, but I do not remember how.
However, these days RunOnceEx still has one important feature: Some people, like me, have programs that fail to load objects because the OS version is not set to XP. When the OS is set to xp, the install-ie6 script does not automatically process the RunOnceEx keys, failling to register all of the DLL's, including the Crypto support needed for programs such as Steam.
As such, for IE6 alone, users have to process 50+ lines by hand, in something that SHOULD be processed at bootup, via wineboot.
Hi Geoffrey,
I'm sorry, I may just still be jetlagged from wineconf. I failed to understand your bug report.
Is that "wineboot does not handle RunOnceEx", does handle it but doesn't run DLLs when using the pipe, runs everything, but the windows version is set incorrectly, or doesn't handle RunOnceEx\Setup?
Shachar
Geoffrey Antos wrote:
Sorry about the confusion...
1. I do not know if wineboot handles RunOnceEx\Setup, I have no need for any such programs anymore. IE uses its own utility for this. 2. Wineboot does not register the DLLs, because Steam gave "Could not connect ..." errors without the RSA Encryption dll from IE6 registered. (rsabase.dll) 3. If wineboot handles the executables in RunOnceEx, it does not delete them. After running wineboot 10+ times after installing IE6, an entry for "grpconv.exe -o" was still listed in a RunOnceEx key. 4. I would not mind writing a patch, but I am unfamiliar with winelib, but could probably work on it bit by bit.
Shachar Shemesh wrote:
Geoffrey wrote:
Apparently, while I may have been a bit lazy, I was at least ordered.
The comments at the begining clearly state RunOnceEx, and clearly state it is not currently implemented.
The soonest I'll have time to look into it is in a month from now. You are most welcome to have a go at it. Winelib should not frighten you in that respect - it's quite simply Win32 programming done on Linux (or whatever OS you are running). The sources for wineboot are all in the one file (programs/wineboot/wineboot.c under the wine source tree).
Feel free to ask questions if you have them. If you don't touch that, I'll try to get it done when I have the time.
As for RunOnceEx\Setup, I wouldn't touch that if I were you. It's not part of wineboot, as far as I know. As you have correctly said, IE installs a special program to handle that. SetupAPI has some method of triggering it to run, but I have never been able to do that outside of INF processing. I think we currently have it working "well enough", and should let leave it at that.
Shachar