Sorry, the OS is W98.
Let me try to explain how all works.
A - The ?startup? contains the ?SQLSRV.EXE? file which executes and starts SQL services.
B - I receive an update to the SQL app. The update is SQL script, which I have to run against the SQL db on the SQL-DB Server. Once done I use the ESD Manager (Electronic Software Distribution) from the App. Server in order to pass the update to the laptops. Simple in terms of execution. Open ESD, pick required file, which has an *.luf extension, pick names of laptops to get updated and I am done. At this point the ESD creates the ?AplPatch.exe? file. The ?AplPatch.exe? contains SQL Scripts.
C - During the day our users have to either dial-in or come to the office to sync their laptop db with the server db. During the sync process the ?AplPatch.exe? file gets uploaded to the laptop(s) and it is placed in the ?startup? folder. The next time the user reboots the laptop the ?AplPatch.exe? starts to execute. Here is where my problem begins. Because ?AplPatch.exe? contains SQL scripts the SQLSRV.EXE has to run 1st, otherwise the user gets a run time error. It is always a matter of milliseconds. If the user has done a defrag lately the SQLSRV.EXE runs quick and the ?AplPatch.exe? has not finished loading, then everything works correctly. If the laptop is running slow, then the SQLSRV.EXE has not finished loading yet and the ?AplPatch.exe? comes right behind it and because SQLSRV.EXE it's not loaded yet the ?AplPatch.exe? creates the run time.
The workaround is to manually go to the ?startup? folder and re-execute the ?AplPatch.exe? again.
What I am looking for is, a way to modify the registry and specified a time lapse for the entries in the ?startup'. Something I can put in place once and not have to worry about it again. My users are nurses and they are familiar with the SQL App, but I do not want them venturing with the OS.