Because you cannot boot to Safe Mode, you run regedit from Program manager.
Boot the computer with a Windows 98 Startup disk. If you do not have one, you have to make one (from a Windows 98 computer or www.bootdisk.com) or borrow one.
Prepare to workaround Windows lockup and to do REGEDIT,
From A: Prompt,
1. type C:
2. type CD: WINDOWS
3. type EDIT SYSTEM.INI
4. replace ?shell=Explorer.exe? to ?shell=progman.exe?
5. Save the change and Exit
6. Reboot the computer
The computer will boot to Program Manager.
1. File | Run and type ?regedit? without the quotes in the Command Line box
2. Navigate to Hkey_Local_Machine | System | CurrentControlSet | Services | VxD | VxDMon and highlight SystemRestore on the right pane. Double click and change the value Y to N.
3. Exit the regedit.
4. File | Exit Windows to shut down the computer
Now the future System Restore is off and you must delete all the previous System Restore files
Boot the computer with a Windows 98 Startup disk.
From A: Prompt, type the following and press ENTER key at each step.
1. CD:\_RESTORE\ARCHIVE
2. Del *.*
3. y
4. CD:\_RESTORE\LOGS
5. Del RESTOREPT.LOG
6. y
7. CD:\_RESTORE\TEMP
8. Del *.*
9. y
Change the setting in System.ini
10. type CD:\
11. type CD:\WINDOWS
12. type EDIT SYSTEM.INI
13. replace ?shell=Progman.exe? to ?shell=Explorer.exe?
14. save the change and Exit
15. Turn the computer off.
Boot the computer to Safe Mode. If the Windows does not lock up, scan for virus and remove them if found. If Windows locks up, refer to my previous answer.