Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

HELP ! Need A Batch File That ...


  • Please log in to reply

#1
command-line

command-line

    New Member

  • Member
  • Pip
  • 1 posts
Hey All :)
i need a batch file that opens it's self at system start up please tell me code
also i need a batch that :) :) :) Displays My I.P

Thanks In Advanced
  • 0

Advertisements


#2
absolute shady

absolute shady

    New Member

  • Member
  • Pip
  • 5 posts
Hi,

here are the steps to accomplish what you seek.

open a notepad.

type the foll. lines in

----------------------------
@echo off
ipconfig
cmd
---------------------------

save the notepad file as somename.bat on some location on your file system.


just try double clicking on the file. let it open. check the output. Is that what you needed ??

certainly that should display the ip address. perhaps you should be connected to a Network in the first place.


then all you need to do this is to add this file to the computer startup. there are two steps as foll.

STEP 1

Go to this location

c:\documents and settings\UserName\Start Menu\Programs\Startup

and just paste the .bat file that you created.

You should be done by this time. Try restarting the compuer and check.

STEP 2

Open "Regedit"

We are assuming that we are experianced users here

Navigate to the location

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

then add a new "string Value" by right clicking on the empty space.

Let the name of the String value be 'ipviewer"
and the value of it should be the location where you have the .bat file

so if suppose you have saved it as "ipviewer.bat" in C drive.

then the value should be "C:\ipviewer.bat"

thats it buddy.

Restart the computer. and Tell me what you get !
Cheers !

-Maran
www.slimshadym23.blogspot.com
  • 0

#3
Ehsanit

Ehsanit

    Member

  • Member
  • PipPipPip
  • 163 posts
Probably a safer way to get the batch file to start at boot time is to merely move it to (or create a shortcut to it in) the Startup folder in the Start Menu, without messing in the registry.

Note that ipconfig includes your IP on the local network (typically 192.168.0.xxx) and not the IP that any external websites or servers would see. Typing CMD is also a poor way of pausing the output. The pause command is better.

Edited by Ehsanit, 22 September 2010 - 01:47 PM.

  • 0

#4
imstuffed123

imstuffed123

    Member

  • Member
  • PipPip
  • 13 posts
Hmm... i'm starting to think you're trying to make some prankware.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP