midiboy Posted April 19, 2006 Share Posted April 19, 2006 (edited) Hi !I have run into a strange problem lately which makes me wonder at what time the next entry in the runonceex registry key is being processed. Does Windows read the next entry when it is the next one the list or does it read all of them into RAM at the beginning of the process ?It must be the latter because somehow all changes to the runonceex entries that are done while the runoncex process has already started are being ignored.The reason why I would need to process runonceex keys during the runonceex process is simple:I am trying to check for the existence of a server. If it is there, I want to mount a share, change the drive letters in all the runonceex entries to that share (instead of cdrom) so the programs are installed from the share instead of CD. Now, I cannot for the life of it get a share mounted during the T12 stage (when runonceex entries are created) ... I tried numerous times. I guess some service is not started yet at that time.So my alternative idea was to run a cmd as the first entry in runonceex that checks for the server and then changes the remaining runonceex entries:if exist \\SERVER\media\Einstellungen\LogonScript\logon.cmd copy /Y \\SERVER\media\Einstellungen\LogonScript\logon.cmd %SYSTEMROOT%if exist "%SYSTEMROOT%\logon.cmd" start /wait "" "%SYSTEMROOT%\logon.cmd"ping -n 5 127.0.0.0.1>nulSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExIF EXIST M:\Installation\AIW4\Setup\Wihu\wihu.exe SET CDROM=M:\Installation\AIW4IF EXIST M:\Installation\alexinstall1.ini REG ADD %KEY%\050 /V 1 /D "%CDROM%\Setup\Wihu\wihu.exe /INI=M:\Installation\alexinstall1.ini /AutoInstall=999 /beep=4 /NoCancel /NoRestartChange /SkipSettings /UseCurrent /SkipRestart /HasGaps /NoAbort" /fIF EXIST M:\Installation\alexinstall2.ini REG ADD %KEY%\051 /V 1 /D "%CDROM%\Setup\Wihu\wihu.exe /INI=M:\Installation\alexinstall2.ini /beep=4 /NoCancel /NoRestartChange /HasGaps /NoAbort" /fetc.Now, the problem is ....if I check the registry after the script has run, those entries are correctly changed eg. from drive E to M. However, it still does not work !!! Programs continue to run from CD and the registry entries seem to get ignored.edit: Just as an explanation: The last two entries already exist in the registry but with slightly different paths etc. If I call the above script, they get changed but the outcome is the same as if the keys had not been changed at all.This is so strange. My only explanation for this is that all runonceex keys are read into ram at the beginning of the process and are not being processed one by one. Is this the case ?What else could I do in my situation ? Any ideas ?Thanks,Alex Edited April 19, 2006 by midiboy Link to comment Share on other sites More sharing options...
midiboy Posted April 21, 2006 Author Share Posted April 21, 2006 No one ? Link to comment Share on other sites More sharing options...
ChiDragon Posted April 21, 2006 Share Posted April 21, 2006 I think any changes would count as additions to the next time "RunOnceEx" is checked and ran (the next reboot). What happens if you use your RunOnceEx entry to check the existence of the server, add the new entries accordingly, then set an auto-reboot? Link to comment Share on other sites More sharing options...
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