Web Hosting Talk







View Full Version : windows equal of unix....


davidb
08-05-2002, 11:00 AM
I acually forgot the name. You know the unix file that is run when the machine is turned on, ie you dont gotta login for it to start. Im looking for something like that in windows. I tried services, but I cant seem to add anything there. I have been using the startup folder of admin to do this, but I dont want to login for the service to start. Any ideas?

Adam_S
08-05-2002, 01:11 PM
You want the windows user to automatically login, or for the process to start outside of the user environment?

JTY
08-05-2002, 01:43 PM
You thinking, autoexec.bat?

davidb
08-05-2002, 02:02 PM
I wasent sure if autoexec was used in 2k. I didnt see it listed as a file, anyhoot, Ill give that a try thanks. And yes, I was looking for something outside the user enviroment

Adam_S
08-05-2002, 02:36 PM
autoexec isn't in 2k.

This registry location holds the auto login

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon

Enter your domain name, account name, and password in DefaultDomainName, DefaultUserName, and DefaultPassword, using the values you would normally type when logging in. If values do not exist, you may add them with Edit, New, String Value, OK. Double-click the new String Value in the right window pane, and enter the password, etc. in the Value data box. The data type should be displayed as "REG-SZ."

You can cheat if you don't want to auto login. Use the task schedular. When you click "Add Scheduled Task" you can request an application to start when the machine starts, not when the user logs in. All you then need to do is specify the username and password of the user that has the privilege of running the app. ;)

davidb
08-05-2002, 04:59 PM
That auto login thing didnt work... The task manager did, thanks.

Also the file I was thinking of was rc.local

Adam_S
08-05-2002, 05:26 PM
Damn... well it was off my head.. too many OSs in there ;)

Lagniappe-labgeek
08-05-2002, 09:28 PM
If you want it to run before you logon, it'll need to be a service. But as you discovers services aren't quite the same as other apps.

There are some programs out there that will run a regular program as a NT/2000 service (don't know if they work with Win9x) One of them is ServiceMill but it's pricy $125 for 1 server.
Others were freeware/shareware and much cheaper. They were popular for getting Setiathome working without having to login. Check around some of the seti groups' sites, you could probably find a link or two to them.

Edit -

The NT Resource kit has the program you need... srvany.exe
Here's a link to the KB about it:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q137890&

markcastle
08-05-2002, 09:36 PM
You could use SrvAny which is in the resource kit - bit difficult to use tho.
If you know any VB(6) do a search for ntsvc.ocx on google and you'll get some good sample code. Alternatively - services are a doddle in Vb.net (or c# or whatever).
Another alternative using Perl.... http://www.roth.net/perl/Daemon/
Cheers

clocker1996
08-05-2002, 10:51 PM
msconfig.exe