[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to delay nt autologin or delay service

Posted on 2004-04-20
8
Medium Priority
?
968 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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.

649 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