Link to home
Start Free TrialLog in
Avatar of trims30
trims30

asked on

How to Start a Program Automatically

I am using Win2000 professional and have two programs that I need to run whenever my computer reboots.

I currently have them in the startup folder and they do run whenever I reboot my computer and login.

How do I run these programs without logging in?  If I have a Power Failure or glitch and computer re-boots while I'm not around, there's no one around to click on the OK Button.

Is it possible to start Windows 2000 as Administrator without having to Log in?  If so, How?
Avatar of bryancw
bryancw

If you want to automatically log on, search for knowledge base article KB315231 on Microsoft’s site.
http://support.microsoft.com/default.aspx?scid=kb;en-us;315231
You can accomplish the same thing with tweakui from Microsoft if you are not comfortable in regedit.

If you do not want to log on automatically, create a couple of scheduled tasks (Control Panel -> Scheduled Tasks.)  On the task tab, browse to the exe for your program, hit the set password button and enter your administrator password.  On the schedule tab, set "Schedule Task:" to " At system Startup".  This should start the app in the administrators context before you logon.
Or you could just use a logon script. But then you'll need to login :\
If you do change your mind.

put a bat file in \\SERVER\NETLOGON with the exec command of the program.
Then in your user options, under profile, you put the name of the bat file in logon script.
Avatar of gidds99
This question should help. You need to run your program as a service as services start before you log on:-

https://www.experts-exchange.com/questions/20318379/run-a-program-like-a-service.html
As the link shows srvant from the 2k resource kit can achieve this - it also mentions freeware which can help.

If you do a search on google for "run as service windows 2000" (without the quotes) you will find many other free and commercial software which can help you.
TRIMS30... My advice is, that you follow GIDDS99's answer to run your programs as a service, thus no need to logon before your programs run.

If you follows the answer from BRYANCV "http://support.microsoft.com/default.aspx?scid=kb;en-us;315231
"Using your account name and password, double-click the DefaultUserName entry, type your user name, and then click OK."
please consider NOT to apply the local administrator and password, but a new local user NOT member of the local admin group. Remember to grant this new local user rights to run your programs.

IF you apply the local administrator and password, then ANYBODY starting the computer, has UNLIMITED admin power to EVERYTHING on your computer.

IF your computer is attached to a network, you will have much more security-problems:

PLEASE READ THIS CAREFULLY:

You must NEVER NEVER add a Domain User Group to the Local Admin Group on each workstation.

And You must NEVER add the same Domain User to the Local Admin Group on more than his/hers own workstation

If You add a Domain User Group to the Local Admin Group, every member of this Domain User Group gets unlimited REMOTE access power of every workstation on Your network.

The unlimited REMOTE access involves:
1. Explorer: \\ComputerName\C$
2. Registry
3. Computer Management (Control Panel)


IF YOU WANT TO KNOW MORE ABOUT THIS ISSUE:
https://www.experts-exchange.com/questions/20506528/DomainUsers-in-LocalAdminGroup.html
http://www.tryware.dk/English/W2kLocalGroupPolicy/TotalAdminPower.html
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windows2000serv/evaluate/featfunc/07w2kadc.asp
http://support.microsoft.com/?kbid=182734


IF YOU WANT TO TEST IT:
You have to grant a Domain User Group to the Local Admin Group on BOTH test-workstations, AND logout and logon again.

Important: You have to make a new logon after creating the credentials, because they are given in W2k in the second where You press ENTER to password when logging on.

Please reply, when You have removed the Domain User Group from the Local Admin Group again!


Many Regards

Jorgen Malmgren
IT-Supervisor
Denmark

:o) Your brain is like a parachute. It works best when it's open

In response to some interesting comments.  The question was...

Is it possible to start Windows 2000 as Administrator without having to Log in?

If he means that he wants to bypass the gina, then autoadminlogon is the obvious answer.  There are obvious security considerations, but I'm answering the question.  It follows that a password can not protect you if you do not have to enter it.

If he simply wants a couple of processes started as administrator when the machine reboots, then a service is the answer.  However, srvany is a pain to use and always has been.  Since IE4, the task scheduler is a much easier solution.  Think of it as a superserver (ie. inetd).  It is a single service that runs other processes.  In NT4, it even gives you the ability to run that other process as a different user.  It does not require you to logon.  It can be managed remotely with the appropriate rights.  A task can be scheduled for times or events like system startup or logon.  This is not suitable for GUI user apps, but the question did not specify.

Trims30, if you are unaware of the security considerations of an autologon, much of what trywaredk said is sound.  I've personally had to go this route on a number of occasions to accomadate poorly developed internal applicatons, but I always made sure that the machine was physically secured (In the locked cabinet, in the locked closet in the back of the locked computer room.)
Sorry, ranting a bit.  I meant to say that the task scheduler can do these things in NT based OS's...  NT,W2K,XP.
The question asked how to run a program as Adminsitrator. If you use srvany.exe you are able to run the program as a service.  Under NT4/2K you can specify which account to run the service under - if you want to run the service as admin (or any other account - including the system account).

As bryancw mentions auto admin log on is the easiest option but there are claerly security considerations.

Also if you find srvany.exe to be a pain then there are other similar solutions which are friendlier (see linked Q above).

This maybe provide an insight (and a download link) for srvany.exe -

http://www.taltech.com/TALtech_web/support/sw_tricks/BCWService.htm
ASKER CERTIFIED SOLUTION
Avatar of limna99
limna99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of trims30

ASKER

That's exactly what I wanted!  

Thanks