Jump to content

Cmd prompt codes


proskater123

Recommended Posts

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

Link to comment
Share on other sites

<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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...