proskater123 Posted September 6, 2006 Posted September 6, 2006 what do i do to allow a computer to run a script like ipconfig /release on startup. I have assess to batch files and then from there to cmd and i want to run the script ipconfig /release everytime one of the computers start. I know im a newb and please don't say crap im experimenting. The computers are windows based machines Quote
Sparda Posted September 7, 2006 Posted September 7, 2006 Create a new short cut to cmd, put it in the startup directory in the "All Programs" menu via the start button, then edit the shortcut path so it says: "%windir%system32cmd.exe" /C ipconfig release It's that simple :P Quote
Darren Kitchen Posted September 7, 2006 Posted September 7, 2006 <grumpy old man> back in my day we had a little file called autoexec.bat, and it spoke with config.sys... and we liked! </grumpy old man> Quote
armadaender Posted September 7, 2006 Posted September 7, 2006 <grumpy old man>back in my day we had a little file called autoexec.bat, and it spoke with config.sys... and we liked! </grumpy old man> Go back to the kitchen and check your blood pressure grandpa. Quote
ckrieger Posted September 7, 2006 Posted September 7, 2006 <grumpy old man>back in my day we had a little file called autoexec.bat, and it spoke with config.sys... and we liked! </grumpy old man> Go back to the kitchen and check your blood pressure grandpa. Burrrrrrn. Haha but I like the grumpy old man tags Darren. Nice touch. :P Quote
uber_tom Posted September 7, 2006 Posted September 7, 2006 This brings me onto a question I've been wondering about, probably worthy of its own topic but... meh. Is there a Linux 'autoexec.bat' kinda script somewhere? I got a lot of commands I'd like to pass at boot Quote
cooper Posted September 7, 2006 Posted September 7, 2006 If you're using the very oldskool init scripts, there's an rc.local somewhere under /etc On more current systems, you'd create a script that does something interesting in the init.d dir that's somewhere under /etc (/etc/rc.d/init.d or /etc/init.d typically). The script will be called with either 'start' or 'stop' as parameter on startup. Check some of the scripts already present to see how they deal with this. Once your script does what needs to be done, create X99ScriptName links in the rc[0-6].d directories pointing at your script. In that X99ScriptName name, the X is either K (call script with stop) or S (call with start) and 99 is a 2-digit number that is used to specify the time at which the script is run. Lower numbers get called sooner in the booting process. The [0-6] in the rc[0-6].d directory name is one of the 7 runlevels. The scripts that are linked to in each of the directories get called when the system enters that runlevel. Run 'man telinit' to get an explanation of what runlevels are, and at what stage which one is entered. Quote
xFilthyxJesusx Posted September 8, 2006 Posted September 8, 2006 Another Alternative would be using the task schedualer to run a batch file at start up. Quote
Sparda Posted September 8, 2006 Posted September 8, 2006 Another Alternative would be using the task schedualer to run a batch file at start up. but who actualy has the task sceduler task enabled? ;) Well... if you are using Vista you have to... other wise alot of stuff stops working... Quote
xFilthyxJesusx Posted September 8, 2006 Posted September 8, 2006 Exactly. Maybe he does. I dont have it enabled otherwise I might have written directions. its not complicated. But i like giving almost word for word if I can "tutorials" Quote
proskater123 Posted September 8, 2006 Author Posted September 8, 2006 no i can not use the task scedualer it is disabled and it isn't even in the start menu. I can't even use the at command in command prompt. I get an "Access is denyed" label. I tryed putting the batch files i wanted to run in the start menu, startup, and when ever i restart the computer there gone. Quote
uber_tom Posted September 9, 2006 Posted September 9, 2006 @cooper Thanks i found /etc/init.d/boot.local it lets me pass commands that are executed before the first run level, so they're present in all. i also found that setting a low swappiness in here makes it boot faster. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.