Yes, there are many programs that can be running in the background that would cause a defrag or scandisk to keep restarting.
That's where booting to safe mode can solve that problem.
--
Note, to get to a command prompt in Win98, it would be start / run / command. The other would be for a NT based operating system like NT4, Windows2000 or XP.