Help in delaying NT services on startup

mingsty

Member
Sep 19, 2003
119
0
0
I am trying to delay a service on an NT server. I have already tried having it depend on another service but it still attempts to load and then just pops up a different error message...saying that the service it depends on isn't started. Is there a place in the registry where you can add a ? or some other way to delay a service than using the "depends on" function in the registry. I would also like to stay away from using a batch file and also would not like to use any third party software. Any help would be greatly appreciated
 

forager

Junior Member
Sep 11, 2003
22
0
0

Try set Recovery to Take No Action under services, and also try setting priority.

Press: Ctr+ALt+Del keys > Task Manager > Processes > right click Set Priority > [chose the apropriate priority setting]
 

SoulAssassin

Diamond Member
Feb 1, 2001
6,135
2
0
Smack me for using a batch file but here goes:

Set the service to manual, create a script with 'net start servicename' in it, put it in the all users/startup folder or call it from the run key in the registry. If necessary insert a sleep cmd prior to it so it waits x seconds after the script start before it starts the service. Here's a 'poor man's' sleep utility if you don't have access to the one in the RK.

--

@ECHO OFF
:: Use local environment
SETLOCAL

:: Check if a timeout period is specified
IF [%1]==[] GOTO Syntax

:: Filter out slashes, they make the IF command crash
ECHO.%1 | FIND "/" >NUL
IF NOT ERRORLEVEL 1 GOTO Syntax

:: Check if specified timeout period is within limits
IF %1 LSS 1 GOTO Syntax
IF %1 GTR 3600 GOTO Syntax

:: Check for a non-existent IP address
:: Note: this causes a small extra delay!
IF NOT DEFINED NonExist SET NonExist=10.255.255.254
PING %NonExist% -n 1 -w 100 | FIND "TTL=" >NUL
IF NOT ERRORLEVEL 1 (
SET NonExist=1.1.1.1
PING %NonExist% -n 1 -w 100 | FIND "TTL=" >NUL
IF NOT ERRORLEVEL 1 GOTO NoNonExist
)

:: Use PING time-outs to create the delay
PING %NonExist% -n %1 -w 1000 >NUL

:: Show online help on errors
IF ERRORLEVEL 1 GOTO Syntax

:: Done
GOTO End

:NoNonExist
ECHO.
ECHO This batch file needs an invalid IP address to function
ECHO correctly.
ECHO Please specify an invalid IP address in an environment
ECHO variable named NonExist and run this batch file again.

:Syntax
ECHO.
ECHO PMSleep.bat
ECHO Poor Man's SLEEP utility, Version 2.00 for Windows NT 4 / 2000 / XP
ECHO Wait for a specified number of seconds.
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
ECHO Corrected and improved by Todd Renzema
ECHO.
ECHO Usage: CALL PMSLEEP nn
ECHO.
ECHO Where: nn is the number of seconds to wait
ECHO nn can range from 1 to 3600
ECHO.
ECHO Note: Due to "overhead" the actual delay may
ECHO prove to be up to a second longer

:End
ENDLOCAL


 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
Why do you want to do this?

Sounds to me like you're probably attempting to solve the wrong problem.
 

mingsty

Member
Sep 19, 2003
119
0
0
Thanks everyone...The problem was fixed by simply updating the novell client....I appreciate everyone's feedback