Solved

How to delay nt autologin or delay service

Posted on 2004-04-20
8
957 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
 

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
Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

 
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 125 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For a variety of reasons, it sometimes makes sense to reboot a Windows-based computer on a regular, perhaps daily basis. This "cures" a lot of ills by resetting processes, flushing caches, refreshing memory, and reestablish network connections. In a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now