?
Solved

How to delay nt autologin or delay service

Posted on 2004-04-20
8
Medium Priority
?
974 Views
Last Modified: 2013-12-28
The problem I have is I have an nt server 4.0 machine set to login automatically.  The problem is one of my 3rd party applications service fails at startup right after login.  The reason for this is the nt services have not fully started up and this application depends on the nt services to start before it can start.  IF I disable auto login the application service starts fine, this is because you get the login prompt now and it gives you an extra few secondsfor the nt services to start before my application services start.  I need to have autologin enabled though, this is just how they want it.  I tried the article "how to delay loading of specific services" Article - 193888 from microsoft, but the instructions to edit and add a value, etc are not an option when I go to services in the registry.  It says to add a new value name Depenonservice with data type of reg_multisz, but there is no option to pick a data type of that type.  I am using regedit, am I using the right registry editor?  Is there any way to delay this service at startup or to delay the autologin by a few seconds so it give the nt services time to start before my applications services start?
0
Comment
Question by:Janice1967
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Expert Comment

by:YarnoSG
ID: 10870236
you are using the WRONG registry editor.

(not an issue in XP, but the registry editors have different capabilities in 2000 and Prior NT Based OSes.)  To generate a REG_MULTI_SZ in 2000 or NT4, you need to be using REGEDT32.
Reference http://support.microsoft.com/default.aspx?scid=kb;EN-US;141377
and an article I wrote 4+ years ago: http://www.winnetmag.com/Article/ArticleID/14738/14738.html
0
 
LVL 7

Expert Comment

by:YarnoSG
ID: 10870241
oh, and the article you had before will work if you use the right editor.....
0
 

Author Comment

by:Janice1967
ID: 10872132
Thanks,
I will try this.  I think the startup file that is failing at atartup is not a service now.  It is a .exe file that is failing. It is located in c:\winnt\profiles\all users\programs\start menu\startup\XXX.exe.  When I go into task manager I see XXX.exe and a PID for it.  It is not listed in the services in Windows nt diagnostics, does this mean it is not a service? If it is not a service then I cannot use the article I mentioned above.  If it is not a service how can I delay this file from running until all the nt services have started.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Expert Comment

by:jzanette
ID: 10872329
You could put the startup commands in a script and then use

   CALL ntlib.cmd /init
   %.Wait% [SecondsToWait]
   YourExeHere

*******

The Advanced Command Library (ntlib.cmd) is free at http://ntlib.com, and includes the .Wait command used in the example.

ntlib.cmd contains NO BINARY CODE, just shell scripting commands.  It runs CONSISTENTLY on NT4SP6a+, 2000, XP and Server 2003.

0
 
LVL 4

Expert Comment

by:averyb
ID: 10934847
If you have access to WinNt Server Resource Kit there are two files you need.  InstSrv.Exe and SrvAny.exe  These two files will let you install any exe as a Service.  

MS Knowledge Base Article 137890

It is rock-solid, and I have used it extensively.
0
 
LVL 4

Accepted Solution

by:
averyb earned 500 total points
ID: 10934862
You could also use sleep.exe form the Resource Kit.  Make a bat file that calls your exe file and enter sleep 30 on the line before the exe command.  That will cause a 30 second pause in the bat file before the next line is read in the bat file.

Using Instsrv and Srvany is a much more elegant way.
0
 

Author Comment

by:Janice1967
ID: 10938832
I created a batch file which called my .exe file and entered sleep 7.  It worked perfectly.  
0
 
LVL 4

Expert Comment

by:averyb
ID: 10945016
Glad it worked.  Using srvany and instsrv will allow you to control the program like a regular NT service from the control panel, services applet or the cmd line.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This tutorial is about creating a new Microsoft Online User Profile account along with how to transfer your files and settings. You may be faced with this situation if your existing user profile has become corrupted.
This is the conclusion of the review and tests for using two or more Password Managers so you don't need to rely on just one. This article describes the results of a lot of testing in different scenario's to reveal which ones best co-exist together.…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question